# HG changeset patch # User Saurabh Singh # Date 2017-10-03 19:09:23 # Node ID 1f5bd3e1a7fe9f068d6dfeff5f693fe706478020 # Parent 5385b76fd1fd25668d609eab31726449b96d7965 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 diff --git a/tests/test-basic.t b/tests/test-basic.t --- a/tests/test-basic.t +++ b/tests/test-basic.t @@ -31,7 +31,9 @@ Writes to stdio succeed and fail appropr $ 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 @@ Writes to stdio succeed and fail appropr [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: