diff libiberty/testsuite/test-expandargv.c @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children 04ced10e8804
line wrap: on
line diff
--- a/libiberty/testsuite/test-expandargv.c	Sun Feb 07 18:28:00 2010 +0900
+++ b/libiberty/testsuite/test-expandargv.c	Fri Feb 12 23:39:51 2010 +0900
@@ -107,6 +107,38 @@
   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 @@
       /* 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++;