##// END OF EJS Templates
test-dispatch: stabilize the test...
Jun Wu -
r34954:0ccb43d4 4.4 stable
parent child Browse files
Show More
@@ -1,76 +1,80 b''
1 test command parsing and dispatch
1 test command parsing and dispatch
2
2
3 $ hg init a
3 $ hg init a
4 $ cd a
4 $ cd a
5
5
6 Redundant options used to crash (issue436):
6 Redundant options used to crash (issue436):
7 $ hg -v log -v
7 $ hg -v log -v
8 $ hg -v log -v x
8 $ hg -v log -v x
9
9
10 $ echo a > a
10 $ echo a > a
11 $ hg ci -Ama
11 $ hg ci -Ama
12 adding a
12 adding a
13
13
14 Missing arg:
14 Missing arg:
15
15
16 $ hg cat
16 $ hg cat
17 hg cat: invalid arguments
17 hg cat: invalid arguments
18 hg cat [OPTION]... FILE...
18 hg cat [OPTION]... FILE...
19
19
20 output the current or given revision of files
20 output the current or given revision of files
21
21
22 options ([+] can be repeated):
22 options ([+] can be repeated):
23
23
24 -o --output FORMAT print output to file with formatted name
24 -o --output FORMAT print output to file with formatted name
25 -r --rev REV print the given revision
25 -r --rev REV print the given revision
26 --decode apply any matching decode filter
26 --decode apply any matching decode filter
27 -I --include PATTERN [+] include names matching the given patterns
27 -I --include PATTERN [+] include names matching the given patterns
28 -X --exclude PATTERN [+] exclude names matching the given patterns
28 -X --exclude PATTERN [+] exclude names matching the given patterns
29
29
30 (use 'hg cat -h' to show more help)
30 (use 'hg cat -h' to show more help)
31 [255]
31 [255]
32
32
33 [defaults]
33 [defaults]
34
34
35 $ hg cat a
35 $ hg cat a
36 a
36 a
37 $ cat >> $HGRCPATH <<EOF
37 $ cat >> $HGRCPATH <<EOF
38 > [defaults]
38 > [defaults]
39 > cat = -r null
39 > cat = -r null
40 > EOF
40 > EOF
41 $ hg cat a
41 $ hg cat a
42 a: no such file in rev 000000000000
42 a: no such file in rev 000000000000
43 [1]
43 [1]
44
44
45 $ cd "$TESTTMP"
45 $ cd "$TESTTMP"
46
46
47 OSError "No such file or directory" / "The system cannot find the path
47 OSError "No such file or directory" / "The system cannot find the path
48 specified" should include filename even when it is empty
48 specified" should include filename even when it is empty
49
49
50 $ hg -R a archive ''
50 $ hg -R a archive ''
51 abort: *: '' (glob)
51 abort: *: '' (glob)
52 [255]
52 [255]
53
53
54 #if no-outer-repo
54 #if no-outer-repo
55
55
56 No repo:
56 No repo:
57
57
58 $ hg cat
58 $ hg cat
59 abort: no repository found in '$TESTTMP' (.hg not found)!
59 abort: no repository found in '$TESTTMP' (.hg not found)!
60 [255]
60 [255]
61
61
62 #endif
62 #endif
63
63
64 #if rmcwd
64 #if rmcwd
65
65
66 Current directory removed:
66 Current directory removed:
67
67
68 $ mkdir $TESTTMP/repo1
68 $ mkdir $TESTTMP/repo1
69 $ cd $TESTTMP/repo1
69 $ cd $TESTTMP/repo1
70 $ rm -rf $TESTTMP/repo1
70 $ rm -rf $TESTTMP/repo1
71 $ HGDEMANDIMPORT=disable hg version -q
71
72 abort: error getting current working directory: * (glob) (no-chg !)
72 The output could be one of the following and something else:
73 chg: abort: failed to getcwd (errno = *) (glob) (chg !)
73 chg: abort: failed to getcwd (errno = *) (glob)
74 [255]
74 abort: error getting current working directory: * (glob)
75 sh: 0: getcwd() failed: No such file or directory
76 Since the exact behavior depends on the shell, only check it returns non-zero.
77 $ HGDEMANDIMPORT=disable hg version -q 2>/dev/null || false
78 [1]
75
79
76 #endif
80 #endif
General Comments 0
You need to be logged in to leave comments. Login now