Show More
@@ -1,5 +1,10 b'' | |||||
1 | A simple testing framework |
|
1 | A simple testing framework | |
2 |
|
2 | |||
|
3 | To run the tests, do: | |||
|
4 | ||||
|
5 | cd tests/ | |||
|
6 | ./run-tests | |||
|
7 | ||||
3 | This finds all scripts in the test directory named test-* and executes |
|
8 | This finds all scripts in the test directory named test-* and executes | |
4 | them. The scripts can be either shell scripts or Python. Each test is |
|
9 | them. The scripts can be either shell scripts or Python. Each test is | |
5 | run in a temporary directory that is removed when the test is complete. |
|
10 | run in a temporary directory that is removed when the test is complete. | |
@@ -25,3 +30,7 b' writing tests:' | |||||
25 |
|
30 | |||
26 | use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates |
|
31 | use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates | |
27 |
|
32 | |||
|
33 | - set -x and pipelines don't generate stable output | |||
|
34 | ||||
|
35 | turn off set -x or break pipelines into pieces | |||
|
36 |
@@ -16,7 +16,8 b' cd r2' | |||||
16 | hg init ../r1 |
|
16 | hg init ../r1 | |
17 | hg up |
|
17 | hg up | |
18 | echo abc > a |
|
18 | echo abc > a | |
19 | hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" |
|
19 | hg diff > ../d | |
|
20 | sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d | |||
20 |
|
21 | |||
21 | cd ../r1 |
|
22 | cd ../r1 | |
22 | echo b > b |
|
23 | echo b > b | |
@@ -31,5 +32,6 b' hg -d up' | |||||
31 | hg -d up -m |
|
32 | hg -d up -m | |
32 | hg parents |
|
33 | hg parents | |
33 | hg -v history |
|
34 | hg -v history | |
34 | hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" |
|
35 | hg diff > ../d | |
|
36 | sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d | |||
35 |
|
37 |
General Comments 0
You need to be logged in to leave comments.
Login now