Mercurial > evolve
changeset 6038:af2fec9b541c
tests: rename num to split-counter and move it to $TESTTMP in test-split.t
Let's not pollute working directory for no reason.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 12 Sep 2021 20:49:21 +0300 |
parents | dd0ddc3dcb0f |
children | 51249e4e9025 |
files | tests/test-split.t |
diffstat | 1 files changed, 8 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-split.t Sun Sep 12 20:31:35 2021 +0300 +++ b/tests/test-split.t Sun Sep 12 20:49:21 2021 +0300 @@ -22,9 +22,9 @@ > hg ci -m "add $1" $2 $3 > } $ cat > $TESTTMP/editor.sh << '__EOF__' - > NUM=$(cat num) + > NUM=$(cat "$TESTTMP/split-counter") > NUM=`expr "$NUM" + 1` - > echo "$NUM" > num + > echo "$NUM" > "$TESTTMP/split-counter" > echo "split$NUM" > "$1" > __EOF__ $ export HGEDITOR="\"sh\" \"$TESTTMP/editor.sh\"" @@ -41,8 +41,8 @@ $ hg debugobsolete 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} -To create commits with the number of split - $ echo 0 > num +Creating commits with the number of split + $ echo 0 > $TESTTMP/split-counter $ hg split << EOF > y > y @@ -432,7 +432,7 @@ parent: 18:26f72cfaf036 tip Works on mytopic branch: new-branch:mytopic - commit: 1 unknown (clean) + commit: (clean) update: (current) phases: 9 draft topic: mytopic @@ -784,7 +784,6 @@ $ hg status ? SPLIT3 ? SPLIT4 - ? num Test restricting the split to a subset of files ----------------------------------------------- @@ -1060,10 +1059,8 @@ o 0:a5a1faba8d26 p (draft) -To create commits with the number of split - $ echo 0 > num - Splitting the revision 1 to SPLIT1 and SPLIT2 which contains file a and b resp: + $ echo 0 > $TESTTMP/split-counter $ hg split -r 1 <<EOF > y > y @@ -1202,10 +1199,8 @@ @@ -0,0 +1,1 @@ +c -To create commits with the number of split - $ echo 0 > num - Splitting + $ echo 0 > $TESTTMP/split-counter $ hg split -r . << EOF > y > y @@ -1266,8 +1261,6 @@ $ hg init discard-after-many $ cd discard-after-many - $ echo 0 > num - $ echo a > a $ echo b > b $ echo c > c @@ -1276,6 +1269,7 @@ XXX: this shouldn't ask to re-examine changes in b and definitely shouldn't revert b + $ echo 0 > $TESTTMP/split-counter $ hg split << EOF > f > d