|
3 | 3 | @test source_location(SourceFile("a"), 2) == (1,2) |
4 | 4 |
|
5 | 5 | @test source_location(SourceFile("a\n"), 2) == (1,2) |
6 | | - @test source_location(SourceFile("a\n"), 3) == (1,3) |
| 6 | + @test source_location(SourceFile("a\n"), 3) == (2,1) |
7 | 7 |
|
8 | 8 | @test source_location(SourceFile("a\nb\n"), 2) == (1,2) |
9 | 9 | @test source_location(SourceFile("a\nb\n"), 3) == (2,1) |
10 | 10 | @test source_location(SourceFile("a\nb\n"), 4) == (2,2) |
11 | | - @test source_location(SourceFile("a\nb\n"), 5) == (2,3) |
| 11 | + @test source_location(SourceFile("a\nb\n"), 5) == (3,1) |
| 12 | + |
| 13 | + @test source_location(SourceFile("\n\n"), 1) == (1,1) |
| 14 | + @test source_location(SourceFile("\n\n"), 2) == (2,1) |
| 15 | + @test source_location(SourceFile("\n\n"), 3) == (3,1) |
12 | 16 |
|
13 | 17 | @test source_location(SourceFile("a"; first_line=7), 1) == (7,1) |
14 | 18 | @test source_location(SourceFile("a"; first_line=7), 2) == (7,2) |
15 | 19 |
|
16 | 20 | @test source_location(SourceFile("a\n"; first_line=7), 2) == (7,2) |
17 | | - @test source_location(SourceFile("a\n"; first_line=7), 3) == (7,3) |
| 21 | + @test source_location(SourceFile("a\n"; first_line=7), 3) == (8,1) |
18 | 22 |
|
19 | 23 | @test source_location(SourceFile("a\nb\n"; first_line=7), 2) == (7,2) |
20 | 24 | @test source_location(SourceFile("a\nb\n"; first_line=7), 3) == (8,1) |
21 | 25 | @test source_location(SourceFile("a\nb\n"; first_line=7), 4) == (8,2) |
22 | | - @test source_location(SourceFile("a\nb\n"; first_line=7), 5) == (8,3) |
| 26 | + @test source_location(SourceFile("a\nb\n"; first_line=7), 5) == (9,1) |
| 27 | + |
23 | 28 |
|
24 | 29 | mktemp() do path, io |
25 | 30 | write(io, "a\n") |
|
0 commit comments