Skip to content

Commit b92e46f

Browse files
authored
[Tests] Add support for separate windows snapshots (ttiimm#3)
The simplest way I could think to get the Windows tests passing again would be to have separate Windows snapshots. I was lazy and didn't write them on Windows, but think I hit up all the different file paths.
2 parents dccb84f + e83fa35 commit b92e46f

14 files changed

+143
-6
lines changed
File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
source: tests\test_java.rs
3+
info:
4+
program: log2src
5+
args:
6+
- "-d"
7+
- tests\java\Basic.java
8+
- "-l"
9+
- tests\resources\java\basic.log
10+
---
11+
success: true
12+
exit_code: 0
13+
----- stdout -----
14+
{"srcRef":{"sourcePath":"tests\\java\\Basic.java","lineNumber":18,"column":16,"name":"main","text":"\"Hello from main\"","vars":[]},"variables":{},"stack":[]}
15+
{"srcRef":{"sourcePath":"tests\\java\\Basic.java","lineNumber":25,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"0"},"stack":[]}
16+
{"srcRef":{"sourcePath":"tests\\java\\Basic.java","lineNumber":25,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"1"},"stack":[]}
17+
{"srcRef":{"sourcePath":"tests\\java\\Basic.java","lineNumber":25,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"2"},"stack":[]}
18+
19+
----- stderr -----

tests/snapshots/test_java__basic_with_log_format.snap renamed to tests/snapshots/test_java__basic_with_log_format_unix.snap

File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
source: tests\test_java.rs
3+
info:
4+
program: log2src
5+
args:
6+
- "-d"
7+
- tests\java\BasicWithCustom.java
8+
- "-l"
9+
- tests\resources\java\basic-class-line.log
10+
- "-f"
11+
- "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}) (?<level>\\w+) (?<file>[\\w$.]+):(?<line>\\d+) (?<method>[\\w$]+): (?<body>.*)$"
12+
---
13+
success: true
14+
exit_code: 0
15+
----- stdout -----
16+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithCustom.java","lineNumber":15,"column":16,"name":"main","text":"\"Hello from main\"","vars":[]},"variables":{},"stack":[]}
17+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithCustom.java","lineNumber":22,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"0"},"stack":[]}
18+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithCustom.java","lineNumber":22,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"1"},"stack":[]}
19+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithCustom.java","lineNumber":22,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"2"},"stack":[]}
20+
21+
----- stderr -----
File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
source: tests\test_java.rs
3+
info:
4+
program: log2src
5+
args:
6+
- "-d"
7+
- tests\java\BasicWithLog.java
8+
- "-l"
9+
- tests\resources\java\basic.log
10+
---
11+
success: true
12+
exit_code: 0
13+
----- stdout -----
14+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithLog.java","lineNumber":18,"column":13,"name":"main","text":"\"Hello from main\"","vars":[]},"variables":{},"stack":[]}
15+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithLog.java","lineNumber":25,"column":17,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"0"},"stack":[]}
16+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithLog.java","lineNumber":25,"column":17,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"1"},"stack":[]}
17+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithLog.java","lineNumber":25,"column":17,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"2"},"stack":[]}
18+
19+
----- stderr -----
File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
source: tests\test_java.rs
3+
info:
4+
program: log2src
5+
args:
6+
- "-d"
7+
- tests\java\BasicWithUpper.java
8+
- "-l"
9+
- tests\resources\java\basic.log
10+
---
11+
success: true
12+
exit_code: 0
13+
----- stdout -----
14+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithUpper.java","lineNumber":18,"column":16,"name":"main","text":"\"Hello from main\"","vars":[]},"variables":{},"stack":[]}
15+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithUpper.java","lineNumber":25,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"0"},"stack":[]}
16+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithUpper.java","lineNumber":25,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"1"},"stack":[]}
17+
{"srcRef":{"sourcePath":"tests\\java\\BasicWithUpper.java","lineNumber":25,"column":20,"name":"foo","text":"\"Hello from foo i=\\{i}\"","vars":["i"]},"variables":{"i":"2"},"stack":[]}
18+
19+
----- stderr -----
File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
source: tests\test_rust.rs
3+
info:
4+
program: log2src
5+
args:
6+
- "-d"
7+
- examples\basic.rs
8+
- "-l"
9+
- tests\resources\rust\basic.log
10+
---
11+
success: true
12+
exit_code: 0
13+
----- stdout -----
14+
{"srcRef":{"sourcePath":"examples\\basic.rs","lineNumber":6,"column":11,"name":"main","text":"\"Hello from main\"","vars":[]},"variables":{},"stack":[[{"sourcePath":"examples\\basic.rs","lineNumber":8,"column":8,"name":"main","text":"foo","vars":[]}]]}
15+
{"srcRef":{"sourcePath":"examples\\basic.rs","lineNumber":13,"column":11,"name":"foo","text":"\"Hello from foo i={}\"","vars":["i"]},"variables":{"i":"0"},"stack":[[{"sourcePath":"examples\\basic.rs","lineNumber":8,"column":8,"name":"main","text":"foo","vars":[]}]]}
16+
{"srcRef":{"sourcePath":"examples\\basic.rs","lineNumber":13,"column":11,"name":"foo","text":"\"Hello from foo i={}\"","vars":["i"]},"variables":{"i":"1"},"stack":[[{"sourcePath":"examples\\basic.rs","lineNumber":8,"column":8,"name":"main","text":"foo","vars":[]}]]}
17+
{"srcRef":{"sourcePath":"examples\\basic.rs","lineNumber":13,"column":11,"name":"foo","text":"\"Hello from foo i={}\"","vars":["i"]},"variables":{"i":"2"},"stack":[[{"sourcePath":"examples\\basic.rs","lineNumber":8,"column":8,"name":"main","text":"foo","vars":[]}]]}
18+
19+
----- stderr -----

0 commit comments

Comments
 (0)