test-basic: make test compatible with chg
The error codes returned when writing to /dev/full are different after
the first failure with and without '--chg' option. Therefore, this commit
conditionally handles the error codes as appropriate.
Test Plan:
Ran the test 'test-basic.t' with and without '--chg' option.
Differential Revision: https://phab.mercurial-scm.org/D922
--- a/tests/test-basic.t Mon Oct 02 20:23:25 2017 -0700
+++ b/tests/test-basic.t Tue Oct 03 12:09:23 2017 -0700
@@ -31,7 +31,9 @@
$ hg status >/dev/full
abort: No space left on device
[255]
+#endif
+#if devfull no-chg
$ hg status >/dev/full 2>&1
[1]
@@ -39,6 +41,14 @@
[1]
#endif
+#if devfull chg
+ $ hg status >/dev/full 2>&1
+ [255]
+
+ $ hg status ENOENT 2>/dev/full
+ [255]
+#endif
+
$ hg commit -m test
This command is ancient: