changeset 34448:1f5bd3e1a7fe

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
author Saurabh Singh <singhsrb@fb.com>
date Tue, 03 Oct 2017 12:09:23 -0700
parents 5385b76fd1fd
children 47b9c572ca32
files tests/test-basic.t
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: