##// END OF EJS Templates
rhg: add harness tests for rhg files...
Antoine Cezar -
r46008:e339693a default
parent child Browse files
Show More
@@ -1,5 +1,6 b''
1 #require rust
1 #require rust
2
2
3 Define an rhg function that will only run if rhg exists
3 $ rhg() {
4 $ rhg() {
4 > if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then
5 > if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then
5 > "$RUNTESTDIR/../rust/target/debug/rhg" "$@"
6 > "$RUNTESTDIR/../rust/target/debug/rhg" "$@"
@@ -8,19 +9,56 b''
8 > exit 80
9 > exit 80
9 > fi
10 > fi
10 > }
11 > }
12
13 Unimplemented command
11 $ rhg unimplemented-command
14 $ rhg unimplemented-command
12 [252]
15 [252]
16
17 Finding root
13 $ rhg root
18 $ rhg root
14 abort: no repository found in '$TESTTMP' (.hg not found)!
19 abort: no repository found in '$TESTTMP' (.hg not found)!
15 [255]
20 [255]
21
16 $ hg init repository
22 $ hg init repository
17 $ cd repository
23 $ cd repository
18 $ rhg root
24 $ rhg root
19 $TESTTMP/repository
25 $TESTTMP/repository
26
27 Unwritable file descriptor
20 $ rhg root > /dev/full
28 $ rhg root > /dev/full
21 abort: No space left on device (os error 28)
29 abort: No space left on device (os error 28)
22 [255]
30 [255]
31
32 Deleted repository
23 $ rm -rf `pwd`
33 $ rm -rf `pwd`
24 $ rhg root
34 $ rhg root
25 abort: error getting current working directory: $ENOENT$
35 abort: error getting current working directory: $ENOENT$
26 [255]
36 [255]
37
38 Listing tracked files
39 $ cd $TESTTMP
40 $ hg init repository
41 $ cd repository
42 $ for i in 1 2 3; do
43 > echo $i >> file$i
44 > hg add file$i
45 > done
46 > hg commit -m "commit $i" -q
47
48 Listing tracked files from root
49 $ rhg files
50 file1
51 file2
52 file3
53
54 Listing tracked files from subdirectory
55 $ mkdir -p path/to/directory
56 $ cd path/to/directory
57 $ rhg files
58 ../../../file1
59 ../../../file2
60 ../../../file3
61
62 Listing tracked files through broken pipe
63 $ rhg files | head -n 1
64 ../../../file1
General Comments 0
You need to be logged in to leave comments. Login now