mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2023-12-13 20:50:18 +01:00
Fix diff parsing and run unit tests
This commit is contained in:
parent
a7d9918b67
commit
e3a121e58a
|
@ -13,3 +13,8 @@ pipeline:
|
||||||
settings:
|
settings:
|
||||||
file_pattern: "*.java"
|
file_pattern: "*.java"
|
||||||
path: "app/"
|
path: "app/"
|
||||||
|
|
||||||
|
test:
|
||||||
|
image: gradle:7.4.1
|
||||||
|
commands:
|
||||||
|
- gradle test
|
||||||
|
|
|
@ -43,6 +43,8 @@ public class ParseDiff {
|
||||||
Matcher rmMatcher = rmPattern.matcher(raw);
|
Matcher rmMatcher = rmPattern.matcher(raw);
|
||||||
Matcher addMatcher = addPattern.matcher(raw);
|
Matcher addMatcher = addPattern.matcher(raw);
|
||||||
|
|
||||||
|
if(raw.startsWith("+")) add++;
|
||||||
|
else if(raw.startsWith("-")) rm++;
|
||||||
while(rmMatcher.find())
|
while(rmMatcher.find())
|
||||||
rm++;
|
rm++;
|
||||||
while(addMatcher.find())
|
while(addMatcher.find())
|
||||||
|
|
Loading…
Reference in a new issue