test-basic: make test compatible with chg
authorSaurabh Singh <singhsrb@fb.com>
Tue, 03 Oct 2017 12:09:23 -0700
changeset 34448 1f5bd3e1a7fe
parent 34447 5385b76fd1fd
child 34449 47b9c572ca32
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
tests/test-basic.t
--- 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: