Exemplo n.º 1
0
 @After
 public void afterEach() {
   System.out.println(">>> " + unix4j);
   if (output == null) {
     unix4j.toStdOut();
   } else {
     unix4j.toOutput(output);
   }
 }
Exemplo n.º 2
0
 @Test
 public void testCut_4_5_6_to_8_string_args() {
   unix4j.fromString("some string").cut("-c", "4,5,6-8");
 }
Exemplo n.º 3
0
 @Test
 public void testCut_4_to_8() {
   unix4j.fromString("some string").cut(Cut.Options.c, Range.between(4, 8));
 }
Exemplo n.º 4
0
 @Test
 public void testCut_4_5_6_7_8() {
   unix4j.fromString("some string").cut(Cut.Options.c, 4, 5, 6, 7, 8);
 }
Exemplo n.º 5
0
 @Test
 public void testLsFile() {
   unix4j.ls("src");
 }
Exemplo n.º 6
0
 @Test
 public void testLsStarStarStarJavaLA() {
   unix4j.ls(
       Ls.Options.l.a, "src/*/*/*/*/*.java", "src/*/*/*/*/*/*.java", "src/*/*/*/*/*/*/*.java");
 }
Exemplo n.º 7
0
 @Test
 public void testLsStarStarStarJava() {
   unix4j.ls("src/*/*/*/*/*.java", "src/*/*/*/*/*/*.java", "src/*/*/*/*/*/*/*.java");
 }
Exemplo n.º 8
0
 @Test
 public void testEcho2() {
   unix4j.echo("Hello", "world");
 }
Exemplo n.º 9
0
 @Test
 public void testLs() {
   unix4j.ls();
 }
Exemplo n.º 10
0
 @Test
 public void testToSystemError() {
   output = new StreamOutput(System.err);
   unix4j.echo("Hello ERROR").grep(GrepOption.ignoreCase, "error");
 }
Exemplo n.º 11
0
 @Test
 public void testLsXargsEcho() {
   unix4j.ls().xargs().echo("XARGS OUTPUT:", Arg.$0);
 }
Exemplo n.º 12
0
 @Test
 public void testEchoGrepMatchIgnoreCase() {
   unix4j.echo("Hello WORLD").grep(GrepOption.ignoreCase, "world");
 }
Exemplo n.º 13
0
 @Test
 public void testEchoGrepNoMatch() {
   unix4j.echo("Hello WORLD").grep("world");
 }
Exemplo n.º 14
0
 @Test
 public void testCut_4_to_string_args() {
   unix4j.fromString("some string").cut("-c", "4-");
 }
Exemplo n.º 15
0
 @Test
 public void testLsStar() {
   unix4j.ls("*");
 }
Exemplo n.º 16
0
 @Test
 public void testLsSort() {
   unix4j.ls().sort();
 }
Exemplo n.º 17
0
 @Test
 public void testLsSortReverse() {
   unix4j.ls().sort(Sort.Options.reverse);
 }