tests/test-editor-filename.t
branchstable
changeset 49621 55c6ebd11cb9
parent 45877 ac362d5a7893
equal deleted inserted replaced
49620:8cd39c20445e 49621:55c6ebd11cb9
     1 Test temp file used with an editor has the expected suffix.
     1 Test temp file used with an editor has the expected suffix.
     2 
     2 
     3   $ hg init
     3   $ hg init repo
       
     4   $ cd repo
     4 
     5 
     5 Create an editor that writes its arguments to stdout and set it to $HGEDITOR.
     6 Create an editor that writes its arguments to stdout and set it to $HGEDITOR.
     6 
     7 
     7   $ cat > editor.sh << EOF
     8   $ cat > editor.sh << EOF
     8   > echo "\$@"
     9   > echo "\$@"
     9   > exit 1
    10   > exit 1
    10   > EOF
    11   > EOF
    11   $ hg add editor.sh
    12   $ hg add editor.sh
    12   $ HGEDITOR="sh $TESTTMP/editor.sh"
    13   $ HGEDITOR="sh $TESTTMP/repo/editor.sh"
    13   $ export HGEDITOR
    14   $ export HGEDITOR
    14 
    15 
    15 Verify that the path for a commit editor has the expected suffix.
    16 Verify that the path for a commit editor has the expected suffix.
    16 
    17 
    17   $ hg commit
    18   $ hg commit