diff options
Diffstat (limited to 'tests/102.sh')
| -rw-r--r-- | tests/102.sh | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/tests/102.sh b/tests/102.sh new file mode 100644 index 0000000..b323893 --- /dev/null +++ b/tests/102.sh @@ -0,0 +1,128 @@ +cat <<'EOF' > expected +1 +1 +2 +2 +3 +4 +3 +4 +EOF + +test_diff <<'EOF' +int printf(); + +int main() { +#if 1 +# if 1 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 1 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 1 +# if 1 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 0 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 1 +# if 0 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 1 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 1 +# if 0 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 0 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 0 +# if 1 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 1 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 0 +# if 1 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 0 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 0 +# if 0 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 1 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif + +#if 0 +# if 0 + printf("1\n"); +# else + printf("2\n"); +# endif +#else +# if 0 + printf("3\n"); +# else + printf("4\n"); +# endif +#endif +} +EOF |
