1
|
|
package com.github.dakusui.actionunit.actions.cmd.unix; |
2
|
|
|
3
|
|
import com.github.dakusui.actionunit.actions.cmd.Commander; |
4
|
|
import com.github.dakusui.actionunit.actions.cmd.CommanderConfig; |
5
|
|
import com.github.dakusui.actionunit.core.context.ContextFunction; |
6
|
|
|
7
|
|
import java.io.File; |
8
|
|
|
9
|
|
import static java.util.Objects.requireNonNull; |
10
|
|
|
11
|
|
public class Ls extends Commander<Ls> { |
12
|
|
public Ls(CommanderConfig config) { |
13
|
|
super(config, "ls"); |
14
|
|
} |
15
|
|
|
16
|
|
public Ls longListing() { |
17
|
1
1. longListing : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::longListing → KILLED
|
return addOption("-l"); |
18
|
|
} |
19
|
|
|
20
|
|
public Ls all() { |
21
|
1
1. all : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::all → KILLED
|
return addOption("-a"); |
22
|
|
} |
23
|
|
|
24
|
|
public Ls size() { |
25
|
1
1. size : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::size → KILLED
|
return addOption("-s"); |
26
|
|
} |
27
|
|
|
28
|
|
public Ls humanReadable() { |
29
|
1
1. humanReadable : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::humanReadable → KILLED
|
return addOption("-h"); |
30
|
|
} |
31
|
|
|
32
|
|
/** |
33
|
|
* Add an indicator to each entry. |
34
|
|
* |
35
|
|
* @return This object |
36
|
|
*/ |
37
|
|
public Ls classify() { |
38
|
1
1. classify : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::classify → KILLED
|
return addOption("-F"); |
39
|
|
} |
40
|
|
|
41
|
|
public Ls reverse() { |
42
|
1
1. reverse : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::reverse → KILLED
|
return addOption("-r"); |
43
|
|
} |
44
|
|
|
45
|
|
public Ls sortByMtime() { |
46
|
1
1. sortByMtime : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::sortByMtime → KILLED
|
return addOption("-t"); |
47
|
|
} |
48
|
|
|
49
|
|
public Ls file(ContextFunction<String> path) { |
50
|
1
1. file : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::file → KILLED
|
return this.add(path); |
51
|
|
} |
52
|
|
|
53
|
|
public Ls file(String path) { |
54
|
1
1. file : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::file → KILLED
|
return this.add(path); |
55
|
|
} |
56
|
|
|
57
|
|
public Ls file(File path) { |
58
|
1
1. file : replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::file → KILLED
|
return this.file(requireNonNull(path).getAbsolutePath()); |
59
|
|
} |
60
|
|
} |
| | Mutations |
17 |
|
1.1 Location : longListing Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenNormalAndHiddenFiles$whenLsWithLongFormat$thenNormalFilesAreListed(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::longListing → KILLED
|
21 |
|
1.1 Location : all Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenNormalAndHiddenFiles$whenLsAll$thenAllFilesAreListed(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::all → KILLED
|
25 |
|
1.1 Location : size Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenSmallFile$whenLsSizeWithHumanReadableOption$thenFilePrintedWithHumanReadableSize(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::size → KILLED
|
29 |
|
1.1 Location : humanReadable Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenSmallFile$whenLsSizeWithHumanReadableOption$thenFilePrintedWithHumanReadableSize(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::humanReadable → KILLED
|
38 |
|
1.1 Location : classify Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenTwoFiles$whenLsSortingByMtimeWithClassifier$thenFilesPrintedInExpectedOrderWithClassifier(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::classify → KILLED
|
42 |
|
1.1 Location : reverse Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenTwoFiles$whenLsWithReverseOrderSortingByMtime$thenFilesPrintedInExpectedOrder(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::reverse → KILLED
|
46 |
|
1.1 Location : sortByMtime Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenTwoFiles$whenLsSortingByMtimeWithClassifier$thenFilesPrintedInExpectedOrderWithClassifier(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::sortByMtime → KILLED
|
50 |
|
1.1 Location : file Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenNormalAndHiddenFiles$whenLsWithContextFunction$thenNormalFileIsListed(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::file → KILLED
|
54 |
|
1.1 Location : file Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenNormalAndHiddenFiles$whenLs$thenNormalFileIsListed(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::file → KILLED
|
58 |
|
1.1 Location : file Killed by : com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest.givenNormalAndHiddenFiles$whenLs$thenNormalFileIsListed(com.github.dakusui.actionunit.ut.actions.cmd.linux.LsTest) replaced return value with null for com/github/dakusui/actionunit/actions/cmd/unix/Ls::file → KILLED
|