# HG changeset patch # User Pulkit Goyal <7895pul...@gmail.com> # Date 1497474018 -19800 # Thu Jun 15 02:30:18 2017 +0530 # Node ID a5027ac9499e9b647f88cea8f2a09399c488d61e # Parent 312ec8385177d5780851ae1e682ea992a99a17ba tests: add a new test-terse-status.t with tests related to terse flag
This adds a new test containing some basic tests related to the terse flag of the status command. The --terse flag can result in buggy output so we need to have good testing for that. More tests will be added by future patches. diff --git a/tests/test-terse-status.t b/tests/test-terse-status.t new file mode 100644 --- /dev/null +++ b/tests/test-terse-status.t @@ -0,0 +1,106 @@ + $ mkdir folder + $ cd folder + $ hg init + $ mkdir x + $ touch a b x/aa.o x/bb.o + $ hg status + ? a + ? b + ? x/aa.o + ? x/bb.o + +Show that only passed status are tersed + $ hg status --terse m + ? a + ? b + ? x/aa.o + ? x/bb.o + $ hg status --terse a + ? a + ? b + ? x/aa.o + ? x/bb.o + $ hg status --terse u + ? a + ? b + ? x/ + $ hg status --terse i + ? a + ? b + ? x/aa.o + ? x/bb.o + $ hg status --terse r + ? a + ? b + ? x/aa.o + ? x/bb.o + $ hg status --terse d + ? a + ? b + ? x/aa.o + ? x/bb.o + $ hg status --terse c + ? a + ? b + ? x/aa.o + ? x/bb.o + $ hg status --terse maudric + ? a + ? b + ? x/ + $ hg status --terse f + abort: Unable to parse the terse status, use marduic + [255] + +Have a .hgignore so that we can also have ignored files + + $ echo ".*\.o" > .hgignore + $ hg status + ? .hgignore + ? a + ? b + $ hg status -i + I x/aa.o + I x/bb.o + + $ hg status -t i + ? .hgignore + ? a + ? b + I x/ + +Test interaction of ignore with other statuses while tersing + + $ hg status -t maudric + ? .hgignore + ? a + ? b + I x/ + + $ touch x/aa x/bb + $ hg status -t marduc + ? .hgignore + ? a + ? b + ? x/ + $ hg status -t mardiuc + ? .hgignore + ? a + ? b + ? x/aa + ? x/bb + I x/aa.o + I x/bb.o + $ hg add x/ + adding x/aa + adding x/bb + $ hg status -t marduc + A x/ + ? .hgignore + ? a + ? b + $ hg status -t marduc -a + A x/ + $ hg status -t marduic -a + A x/aa + A x/bb _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel