Home | History | Annotate | Download | only in tests
      1 #!/bin/bash
      2 
      3 #testing "name" "command" "result" "infile" "stdin"
      4 
      5 seq 10 > left
      6 seq 11 > right
      7 
      8 expected='--- left
      9 +++ right
     10 @@ -8,3 +8,4 @@
     11  8
     12  9
     13  10
     14 +11
     15 '
     16 # Hm this only gives unified diffs?
     17 testing "simple" "diff left right" "$expected" "" ""
     18 
     19 
     20 expected='--- tree1/file
     21 +++ tree2/file
     22 @@ -1 +1 @@
     23 -foo
     24 +food
     25 '
     26 mkdir -p tree1 tree2
     27 echo foo > tree1/file
     28 echo food > tree2/file
     29 
     30 testing "simple" "diff -r tree1 tree2 |tee out" "$expected" "" ""
     31