Mercurial > hg > CbC > CbC_gcc
comparison libiberty/testsuite/test-pexecute.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | a06113de4d67 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Pexecute test program, | 1 /* Pexecute test program, |
2 Copyright (C) 2005 Free Software Foundation, Inc. | 2 Copyright (C) 2005-2017 Free Software Foundation, Inc. |
3 Written by Ian Lance Taylor <ian@airs.com>. | 3 Written by Ian Lance Taylor <ian@airs.com>. |
4 | 4 |
5 This file is part of GNU libiberty. | 5 This file is part of GNU libiberty. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
279 subargv[2] = "foo"; | 279 subargv[2] = "foo"; |
280 subargv[3] = NULL; | 280 subargv[3] = NULL; |
281 TEST_PEX_RUN (pex1, 0, "./test-pexecute", subargv, NULL, NULL); | 281 TEST_PEX_RUN (pex1, 0, "./test-pexecute", subargv, NULL, NULL); |
282 e = TEST_PEX_READ_OUTPUT (pex1); | 282 e = TEST_PEX_READ_OUTPUT (pex1); |
283 CHECK_LINE (e, "foo"); | 283 CHECK_LINE (e, "foo"); |
284 if (TEST_PEX_GET_STATUS_1 (pex1) != 0) | |
285 ERROR ("echo exit status failed"); | |
286 pex_free (pex1); | |
287 | |
288 /* Check empty parameters don't get lost. */ | |
289 pex1 = TEST_PEX_INIT (PEX_USE_PIPES, "temp"); | |
290 subargv[1] = "echo"; | |
291 subargv[2] = "foo"; | |
292 subargv[3] = ""; | |
293 subargv[4] = "bar"; | |
294 subargv[5] = NULL; | |
295 TEST_PEX_RUN (pex1, 0, "./test-pexecute", subargv, NULL, NULL); | |
296 e = TEST_PEX_READ_OUTPUT (pex1); | |
297 CHECK_LINE (e, "foo bar"); /* Two spaces! */ | |
284 if (TEST_PEX_GET_STATUS_1 (pex1) != 0) | 298 if (TEST_PEX_GET_STATUS_1 (pex1) != 0) |
285 ERROR ("echo exit status failed"); | 299 ERROR ("echo exit status failed"); |
286 pex_free (pex1); | 300 pex_free (pex1); |
287 | 301 |
288 pex1 = TEST_PEX_INIT (PEX_USE_PIPES, "temp"); | 302 pex1 = TEST_PEX_INIT (PEX_USE_PIPES, "temp"); |