| 1 | #!/bin/sh |
| 2 | |
| 3 | t=`basename $0` |
| 4 | |
| 5 | cat > $t.Iin <<\EOF |
| 6 | #if(FOO) |
| 7 | #endif |
| 8 | |
| 9 | " /* make sure comment in quote is ignored " |
| 10 | #if 1 |
| 11 | */ |
| 12 | #else |
| 13 | /* This file has no newline at end. */ |
| 14 | #endif |
| 15 | EOF |
| 16 | |
| 17 | # Remove newline from end of $t.Iin |
| 18 | tr '\012' @ < $t.Iin |sed 's/@$//' |tr @ '\012' > $t.I |
| 19 | rm -f $t.Iin |
| 20 | |
| 21 | cat > $t.EOin <<\EOF |
| 22 | #if (FOO) |
| 23 | #endif |
| 24 | |
| 25 | " /* make sure comment in quote is ignored " |
| 26 | #if 1 |
| 27 | */ |
| 28 | #else |
| 29 | /* This file has no newline at end. */ |
| 30 | #endif |
| 31 | EOF |
| 32 | tr '\012' @ < $t.EOin |sed 's/@$//' |tr @ '\012' > $t.EO |
| 33 | rm -f $t.EOin |
| 34 | |
| 35 | cat > $t.Ee <<\EOF |
| 36 | EOF |
| 37 | |
| 38 | options= |
| 39 | expected_status=0 |
| 40 | |
| 41 | . $top_srcdir/tests/test-common |