mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
fa1c4e5ebe
Many tests didn't change back from subdirectories at the end of the tests ... and they don't have to. The missing 'cd ..' could always be added when another test case is added to the test file. This change do that tests (99.5%) consistently end up in $TESTDIR where they started, thus making it simpler to extend them or move them around.
54 lines
1.1 KiB
Perl
54 lines
1.1 KiB
Perl
$ 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 ..
|