##// END OF EJS Templates
test-editor-filename: fix portability of fake editor command...
Yuya Nishihara -
r34060:4bf18894 default
parent child Browse files
Show More
@@ -5,20 +5,18 b' Test temp file used with an editor has t'
5 Create an editor that writes its arguments to stdout and set it to $HGEDITOR.
5 Create an editor that writes its arguments to stdout and set it to $HGEDITOR.
6
6
7 $ cat > editor.sh << EOF
7 $ cat > editor.sh << EOF
8 > #!/bin/bash
9 > echo "\$@"
8 > echo "\$@"
10 > exit 1
9 > exit 1
11 > EOF
10 > EOF
12 $ chmod +x editor.sh
13 $ hg add editor.sh
11 $ hg add editor.sh
14 $ HGEDITOR=$TESTTMP/editor.sh
12 $ HGEDITOR="sh $TESTTMP/editor.sh"
15 $ export HGEDITOR
13 $ export HGEDITOR
16
14
17 Verify that the path for a commit editor has the expected suffix.
15 Verify that the path for a commit editor has the expected suffix.
18
16
19 $ hg commit
17 $ hg commit
20 *.commit.hg.txt (glob)
18 *.commit.hg.txt (glob)
21 abort: edit failed: editor.sh exited with status 1
19 abort: edit failed: sh exited with status 1
22 [255]
20 [255]
23
21
24 Verify that the path for a histedit editor has the expected suffix.
22 Verify that the path for a histedit editor has the expected suffix.
@@ -31,7 +29,7 b' Verify that the path for a histedit edit'
31 $ hg commit --message 'At least one commit for histedit.'
29 $ hg commit --message 'At least one commit for histedit.'
32 $ hg histedit
30 $ hg histedit
33 *.histedit.hg.txt (glob)
31 *.histedit.hg.txt (glob)
34 abort: edit failed: editor.sh exited with status 1
32 abort: edit failed: sh exited with status 1
35 [255]
33 [255]
36
34
37 Verify that when performing an action that has the side-effect of creating an
35 Verify that when performing an action that has the side-effect of creating an
General Comments 0
You need to be logged in to leave comments. Login now