blob: 21f1fef43edddb08ad43193209fde383419bc2f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* Basic argc/argv tests.
# mach: bfin
# cc: -msim
# progopts: a bb ccc dddd
*/
int streq(const char *s1, const char *s2)
{
int i = 0;
while (s1[i] && s2[i] && s1[i] == s2[i])
++i;
return s1[i] == '\0' && s2[i] == '\0';
}
int main(int argc, char *argv[])
{
if (argc != 5)
return 1;
if (!streq(argv[1], "a"))
return 2;
if (!streq(argv[2], "bb"))
return 2;
if (!streq(argv[3], "ccc"))
return 2;
if (!streq(argv[4], "dddd"))
return 2;
puts("pass");
return 0;
}
|