# HG changeset patch # User David A. Holland # Date 1371048670 14400 # Node ID cb08e397ce7b21bf6126c165f5c3dc1cd7c8ed86 # Parent 4e98022c3ce261173ecc4773e2f4175b163d64be Test nested ifs. diff -r 4e98022c3ce2 -r cb08e397ce7b tests/Makefile --- a/tests/Makefile Tue Jun 11 19:14:17 2013 -0400 +++ b/tests/Makefile Wed Jun 12 10:51:10 2013 -0400 @@ -3,7 +3,7 @@ TESTS=\ t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15 t16 \ - t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 + t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 all: run-tests .WAIT show-diffs diff -r 4e98022c3ce2 -r cb08e397ce7b tests/t28.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/t28.c Wed Jun 12 10:51:10 2013 -0400 @@ -0,0 +1,53 @@ +#if 1 +. right + +# if 1 +.. right +# elif 1 +.. wrong +# elif 0 +.. wrong +# else +.. wrong +# endif + +#elif 1 +. wrong + +# if 1 +.. wrong +# elif 1 +.. wrong +# elif 0 +.. wrong +# else +.. wrong +# endif + +#elif 0 +. wrong + +# if 1 +.. wrong +# elif 1 +.. wrong +# elif 0 +.. wrong +# else +.. wrong +# endif + +#else +. wrong + +# if 1 +.. wrong +# elif 1 +.. wrong +# elif 0 +.. wrong +# else +.. wrong +# endif + +#endif diff -r 4e98022c3ce2 -r cb08e397ce7b tests/t28.good --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/t28.good Wed Jun 12 10:51:10 2013 -0400 @@ -0,0 +1,2 @@ +. right +.. right diff -r 4e98022c3ce2 -r cb08e397ce7b tests/t29.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/t29.c Wed Jun 12 10:51:10 2013 -0400 @@ -0,0 +1,4 @@ +#if 0 +# if this is a syntax error +# endif +#endif diff -r 4e98022c3ce2 -r cb08e397ce7b tests/t29.good