From b6251d39d5f5b187a7455923caeede3b962a6d0e Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 20 Sep 2001 19:12:42 +0000 Subject: Add dummy C code to use argc and argv in tests. --- test/Default.py | 2 ++ test/Program-j.py | 4 ++++ test/Program.py | 1 + 3 files changed, 7 insertions(+) diff --git a/test/Default.py b/test/Default.py index 0666a77..916ad24 100644 --- a/test/Default.py +++ b/test/Default.py @@ -39,6 +39,7 @@ for dir in ['one', 'two', 'three']: int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf("%s\n"); exit (0); } @@ -48,6 +49,7 @@ main(int argc, char *argv[]) int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf("%s\n"); exit (0); } diff --git a/test/Program-j.py b/test/Program-j.py index 41d32cb..57b0d67 100644 --- a/test/Program-j.py +++ b/test/Program-j.py @@ -18,6 +18,7 @@ test.write('f1.c', """ int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf(\"f1.c\n\"); exit (0); } @@ -27,6 +28,7 @@ test.write('f2.c', """ int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf(\"f2.c\n\"); exit (0); } @@ -37,6 +39,7 @@ test.write('f3.c', """ int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf(\"f3.c\n\"); exit (0); } @@ -46,6 +49,7 @@ test.write('f4.c', """ int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf(\"f4.c\n\"); exit (0); } diff --git a/test/Program.py b/test/Program.py index 06562dc..a2b0e4b 100644 --- a/test/Program.py +++ b/test/Program.py @@ -15,6 +15,7 @@ test.write('foo.c', """ int main(int argc, char *argv[]) { + argv[argc++] = "--"; printf("foo.c\n"); exit (0); } -- cgit v0.12