tests/test-hghave.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 22 Jan 2015 00:07:06 +0900
branchstable
changeset 23934 975c4fc4a512
parent 12430 60738066e37a
child 25472 4d2b9b304ad0
permissions -rw-r--r--
hg.bat: return exit code explicitly for indirect invocation When "hg.bat" is invoked via interactive shell "cmd.exe" on Windows, it can store own exit code into ERRORLEVEL correctly, regardless of explicit "exit" statement in it: "cmd.exe" seems to hold ERRORLEVEL updated by the last command in the batch file (= "python hg", in "hg.bat" case). On the other hand, "hg.bat" is invoked indirectly via "subprocess.Popen" (e.g. shell alias, hooks, hgclient and so on), the parent process always receives exit code 0 from spawned "hg.bat": batch files on Windows seem not to be really spawned like as shell scripts on UNIX, but to be executed in the "cmd.exe" process. This patch returns exit code explicitly for indirect invocation. "/b" should be specified for "exit" to prevent "cmd.exe" from being terminated when "hg.bat" is invoked interactively from it.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12430
60738066e37a tests: unify test-hghave
Matt Mackall <mpm@selenic.com>
parents: 8059
diff changeset
     1
Testing that hghave does not crash when checking features
8059
41a2c5cbcb6a hghave: checking that all targets are Exception-free
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
     2
12430
60738066e37a tests: unify test-hghave
Matt Mackall <mpm@selenic.com>
parents: 8059
diff changeset
     3
  $ "$TESTDIR/hghave" --test-features 2>/dev/null