-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from dlidstrom/original-line-numbers
Original line numbers
- Loading branch information
Showing
11 changed files
with
184 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ duplo | |
build | ||
.vscode | ||
out.txt | ||
out.xml | ||
files.lst | ||
CMakeFiles | ||
CMakeCache.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
AAAAA | ||
BBBBB | ||
CCCCC | ||
DDDDD | ||
EEEEE | ||
/* some comment to offset the line numbers */ | ||
AAAAA | ||
BBBBB | ||
CCCCC | ||
// skip this line | ||
DDDDD | ||
EEEEE | ||
FFFFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/Simple/LineNumbers.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
setup() { | ||
run ./build/duplo -xml tests/Simple/LineNumbers.lst out.xml | ||
} | ||
|
||
@test "LineNumbers.c" { | ||
[ "$status" -eq 0 ] | ||
[ "${lines[0]}" = "Loading and hashing files ... 2 done." ] | ||
[ "${lines[1]}" = "tests/Simple/LineNumbers.c found: 1 block(s)" ] | ||
} | ||
|
||
@test "LineNumbers.c out.xml" { | ||
run cat out.xml | ||
printf 'Lines:\n' | ||
printf 'lines %s\n' "${lines[@]}" >&2 | ||
[ "${lines[0]}" = "<?xml version=\"1.0\"?>" ] | ||
[ "${lines[1]}" = "<duplo>" ] | ||
[ "${lines[2]}" = " <set LineCount=\"5\">" ] | ||
[ "${lines[3]}" = " <block SourceFile=\"tests/Simple/LineNumbers.c\" StartLineNumber=\"7\" EndLineNumber=\"13\"/>" ] | ||
[ "${lines[4]}" = " <block SourceFile=\"tests/Simple/LineNumbers.c\" StartLineNumber=\"1\" EndLineNumber=\"7\"/>" ] | ||
[ "${lines[5]}" = " <lines xml:space=\"preserve\">" ] | ||
[ "${lines[6]}" = " <line Text=\"AAAAA\"/>" ] | ||
[ "${lines[7]}" = " <line Text=\"BBBBB\"/>" ] | ||
[ "${lines[8]}" = " <line Text=\"CCCCC\"/>" ] | ||
[ "${lines[9]}" = " <line Text=\"DDDDD\"/>" ] | ||
[ "${lines[10]}" = " <line Text=\"EEEEE\"/>" ] | ||
[ "${lines[11]}" = " </lines>" ] | ||
[ "${lines[12]}" = " </set>" ] | ||
[ "${lines[13]}" = "</duplo>" ] | ||
} |
Oops, something went wrong.