Mercurial > hg
view tests/test-merge2.t @ 24892:8cc6036bca53 stable 3.4
tests: make tests with temporary environment setting portable
With "dash" (as "/bin/sh" on Debian GNU/Linux), command execution in
"ENV=val foo bar" style doesn't work as expect in test script files,
if "foo" is user-defined function: it works fine, if "foo" is existing
commands like "hg".
09049042ab99 introduced tests for HGPLAIN and HGPLAINEXCEPT into
test-revset.t, and all of them are in such style.
This patch doesn't:
- add explicit unsetting for HGPLAIN and HGPLAINEXCEPT
they are already introduced by 09049042ab99
- write assignment and exporting in one line
"ENV=val; export ENV" for two or more environment variables in one
line causes failure of test-check-code-hg.t: it is recognized as
"don't export and assign at once" unfortunately.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 02 May 2015 00:15:03 +0900 |
parents | f2719b387380 |
children | 1850066f9e36 |
line wrap: on
line source
$ hg init t $ cd t $ echo This is file a1 > a $ hg add a $ hg commit -m "commit #0" $ echo This is file b1 > b $ hg add b $ hg commit -m "commit #1" $ rm b $ hg update 0 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo This is file b2 > b $ hg add b $ hg commit -m "commit #2" created new head $ cd ..; rm -r t $ mkdir t $ cd t $ hg init $ echo This is file a1 > a $ hg add a $ hg commit -m "commit #0" $ echo This is file b1 > b $ hg add b $ hg commit -m "commit #1" $ rm b $ hg update 0 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo This is file b2 > b $ hg commit -A -m "commit #2" adding b created new head $ cd ..; rm -r t $ hg init t $ cd t $ echo This is file a1 > a $ hg add a $ hg commit -m "commit #0" $ echo This is file b1 > b $ hg add b $ hg commit -m "commit #1" $ rm b $ hg remove b $ hg update 0 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo This is file b2 > b $ hg commit -A -m "commit #2" adding b created new head $ cd ..