Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Unified Diff: gcc/libiberty/testsuite/test-expandargv.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/libiberty/pex-unix.c ('k') | gcc/libiberty/vmsbuild.com » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/libiberty/testsuite/test-expandargv.c
diff --git a/gcc/libiberty/testsuite/test-expandargv.c b/gcc/libiberty/testsuite/test-expandargv.c
index 9d1af01454598941576e67123e15c16cc5c2f465..c16a0322a6c4b20ba77604f686e7cfd38a225d95 100644
--- a/gcc/libiberty/testsuite/test-expandargv.c
+++ b/gcc/libiberty/testsuite/test-expandargv.c
@@ -107,6 +107,38 @@ const char *test_data[] = {
ARGV0,
0,
+ /* Test 4 - Check for options beginning with an empty line. */
+ "\na\nb", /* Test 4 data */
+ ARGV0,
+ "@test-expandargv-4.lst",
+ 0,
+ ARGV0,
+ "a",
+ "b",
+ 0,
+
+ /* Test 5 - Check for options containing an empty argument. */
+ "a\n''\nb", /* Test 5 data */
+ ARGV0,
+ "@test-expandargv-5.lst",
+ 0,
+ ARGV0,
+ "a",
+ "",
+ "b",
+ 0,
+
+ /* Test 6 - Check for options containing a quoted newline. */
+ "a\n'a\n\nb'\nb", /* Test 6 data */
+ ARGV0,
+ "@test-expandargv-6.lst",
+ 0,
+ ARGV0,
+ "a",
+ "a\n\nb",
+ "b",
+ 0,
+
0 /* Test done marker, don't remove. */
};
@@ -246,7 +278,7 @@ run_tests (const char **test_data)
/* Compare each of the argv's ... */
else
for (k = 0; k < argc_after; k++)
- if (strncmp (argv_before[k], argv_after[k], strlen(argv_after[k])) != 0)
+ if (strcmp (argv_before[k], argv_after[k]) != 0)
{
printf ("FAIL: test-expandargv-%d. Arguments don't match.\n", i);
failed++;
« no previous file with comments | « gcc/libiberty/pex-unix.c ('k') | gcc/libiberty/vmsbuild.com » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698