summaryrefslogtreecommitdiff
path: root/libiberty/testsuite/test-expandargv.c
diff options
context:
space:
mode:
authorrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-09 20:58:24 +0000
committerrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-09 20:58:24 +0000
commit7f4db7c80779ecbc57d1146654daf0acfe18de66 (patch)
tree3af522a3b5e149c3fd498ecb1255994daae2129a /libiberty/testsuite/test-expandargv.c
parent611349f0ec42a37591db2cd02974a11a48d10edb (diff)
downloadgcc-profile-stdlib.tar.gz
merge from trunkprofile-stdlib
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@154052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/testsuite/test-expandargv.c')
-rw-r--r--libiberty/testsuite/test-expandargv.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/libiberty/testsuite/test-expandargv.c b/libiberty/testsuite/test-expandargv.c
index 9d1af014545..c16a0322a6c 100644
--- a/libiberty/testsuite/test-expandargv.c
+++ b/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++;