Skip to content

Commit 888f993

Browse files
committed
feat: add new output file and update test script
1 parent cf2fb0f commit 888f993

File tree

2 files changed

+32
-12
lines changed

2 files changed

+32
-12
lines changed

out.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"EndLineNumber1": 13,
4+
"EndLineNumber2": 7,
5+
"LineCount": 5,
6+
"Lines": [
7+
"AAAAA",
8+
"BBBBB",
9+
"CCCCC",
10+
"DDDDD",
11+
"EEEEE"
12+
],
13+
"SourceFile1": "tests/Simple/LineNumbers.c",
14+
"SourceFile2": "tests/Simple/LineNumbers.c",
15+
"StartLineNumber1": 7,
16+
"StartLineNumber2": 1
17+
}
18+
]

tests/test.bats

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[ "$status" -eq 1 ]
88
[ "${lines[0]}" = "NAME" ]
99
[ "${lines[2]}" = "SYNOPSIS" ]
10-
[ "${lines[3]}" = " duplo [OPTIONS] [INTPUT_FILELIST] [OUTPUT_FILE]" ]
10+
[ "${lines[3]}" = " duplo [OPTIONS] [INPUT_FILELIST] [OUTPUT_FILE]" ]
1111
[ "${lines[4]}" = "DESCRIPTION" ]
1212
[ "${lines[5]}" = " Duplo is a tool to find duplicated code blocks in large" ]
1313
[ "${lines[6]}" = " C/C++/Java/C#/VB.Net/Ada software systems." ]
@@ -18,15 +18,17 @@
1818
[ "${lines[11]}" = " -mc minimal characters in line (default is 3)" ]
1919
[ "${lines[12]}" = " lines with less characters are ignored" ]
2020
[ "${lines[13]}" = " -n only report for first N files" ]
21-
[ "${lines[14]}" = " -ip ignore preprocessor directives" ]
22-
[ "${lines[15]}" = " -d ignore file pairs with same name" ]
23-
[ "${lines[16]}" = " -xml output file in XML" ]
24-
[ "${lines[17]}" = " -json output file in JSON format" ]
25-
[ "${lines[18]}" = " INPUT_FILELIST input filelist (specify '-' to read from stdin)" ]
26-
[ "${lines[19]}" = " OUTPUT_FILE output file (specify '-' to output to stdout)" ]
27-
[ "${lines[20]}" = "VERSION" ]
28-
[ "${lines[22]}" = "AUTHORS" ]
29-
[ "${lines[23]}" = " Daniel Lidstrom ([email protected])" ]
30-
[ "${lines[24]}" = " Christian M. Ammann ([email protected])" ]
31-
[ "${lines[25]}" = " Trevor D'Arcy-Evans ([email protected])" ]
21+
[ "${lines[14]}" = " -j number of threads to use (default is 1)" ]
22+
[ "${lines[15]}" = " -ip ignore preprocessor directives" ]
23+
[ "${lines[16]}" = " -d ignore file pairs with same name" ]
24+
[ "${lines[17]}" = " -xml output file in XML" ]
25+
[ "${lines[18]}" = " -json output file in JSON format" ]
26+
[ "${lines[19]}" = " INPUT_FILELIST input filelist (specify '-' to read from stdin)" ]
27+
[ "${lines[20]}" = " OUTPUT_FILE output file (specify '-' to output to stdout)" ]
28+
[ "${lines[21]}" = "VERSION" ]
29+
[ "${lines[23]}" = "AUTHORS" ]
30+
[ "${lines[24]}" = " Daniel Lidstrom ([email protected])" ]
31+
[ "${lines[25]}" = " Christian M. Ammann ([email protected])" ]
32+
[ "${lines[26]}" = " Trevor D'Arcy-Evans ([email protected])" ]
33+
[ "${lines[27]}" = " Christos Gkantidis ([email protected])" ]
3234
}

0 commit comments

Comments
 (0)