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