diff options
| -rw-r--r-- | src/io.c | 1 | ||||
| -rw-r--r-- | tests/103.sh | 11 |
2 files changed, 12 insertions, 0 deletions
@@ -60,6 +60,7 @@ char infile_peek_char(InFile* f) { // TODO: crlf if (c2 == '\r' || c2 == '\n') { f->pos += 2; + ++f->loc.line; return infile_peek_char(f); } } diff --git a/tests/103.sh b/tests/103.sh index f10d215..becfa50 100644 --- a/tests/103.sh +++ b/tests/103.sh @@ -13,3 +13,14 @@ test_diff <<'EOF' #endif int main() {} EOF + +cat <<'EOF' > expected +main.c:5: foo +EOF +test_compile_error <<'EOF' +#define \ + A \ + B + +#error "foo" +EOF |
