summaryrefslogtreecommitdiff
path: root/t/t7005-editor.sh
AgeCommit message (Collapse)Author
2009-04-05tests: remove exit after test_done callJeff King
test_done always exits, so this line is never executed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25t7005-editor: Use $SHELL_PATH in the editor scriptsJohannes Sixt
The test sets up various shell scripts and uses them as commit message editors. On Windows, we need a shebang line in order to recognize the files as executable shell scripts. This adds it. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19Call 'say' outside test_expect_successJohannes Sixt
There were some uses of 'say' inside test_expect_success. But if the tests were not run in verbose mode, this message went to /dev/null. Pull them out of test_expect_success. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2008-04-07test suite: remove useless TERM cruft in "t7005-editor.sh"Christian Couder
In commit 15387e3 (Test suite: reset TERM to its previous value after testing., 2007-10-26), I added a workaround to reset TERM to its previous value before the "test_done" at the end of "t7005-editor.sh" because otherwise "test_done" would have printed the test result with a bad TERM env variable (this resulted in output with no color on konsole). But since commit c2116a1 (test-lib: fix TERM to dumb for test repeatability, 2008-03-06), colored output is printed in a subshell with TERM reset to its original value so the earlier workaround is not needed anymore. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-12launch_editor(): allow spaces in the filenameJohannes Schindelin
The construct sh -c "$0 \"$@\"" <editor> <file> does not pick up quotes in <editor>, so you cannot give path to the editor that has a shell IFS whitespace in it, and also give it initial set of parameters and flags. Replace $0 with <editor> to fix this issue. This fixes git config core.editor '"c:/Program Files/What/Ever.exe"' In other words, you can specify an editor with spaces in its path using a config containing something like this: [core] editor = \"c:/Program Files/Darn/Spaces.exe\" NOTE: we cannot just replace the $0 with \"$0\", because we still want this to work: [core] editor = emacs -nw Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-23t7005: do not exit inside test.Junio C Hamano
The way to signal failure is to leave non-zero in $?, not abort the entire test. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14Merge branch 'bs/maint-t7005'Junio C Hamano
* bs/maint-t7005: t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH
2007-11-11t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATHBjörn Steinbrink
The git wrapper executable always prepends the GIT_EXEC_PATH build variable to the current PATH, so prepending "." to the PATH is not enough to give precedence to the fake vi executable. The --exec-path option allows to prepend a directory to PATH even before GIT_EXEC_PATH (which is added anyway), so we can use that instead. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-27Test suite: reset TERM to its previous value after testing.Christian Couder
Using konsole, I get no colored output at the end of "t7005-editor.sh" without this patch. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-20Add GIT_EDITOR environment and core.editor configuration variablesAdam Roben
These variables let you specify an editor that will be launched in preference to the EDITOR and VISUAL environment variables. The order of preference is GIT_EDITOR, core.editor, EDITOR, VISUAL. [jc: added a test and config variable documentation] Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>