4 use Test::More tests => 11;
6 use Function::Parameters;
8 fun actual_location_of_line_with($marker) {
9 seek DATA, 0, 0 or die "seek DATA: $!";
11 while (my $line = readline DATA) {
13 index($line, $marker) >= 0
19 fun test_loc($marker) {
20 my $expected = actual_location_of_line_with $marker;
21 defined $expected or die "$marker: something done fucked up";
22 my $got = (caller)[2];
23 is $got, $expected, "location of '$marker'";
36 test_loc 'LX creative formatting'; }
52 #local $TODO = 'expressions break line numbers???';
64 #local $TODO = 'newlines in prototype/attributes';
70 { test_loc 'LX -- 5 (inner)' }
72 test_loc 'LX -- 5 (bonus)';
74 test_loc 'LX -- 5 (outer)';