Skip to content

Commit 6fc4964

Browse files
committed
test: check number of log lines
1 parent 41cc873 commit 6fc4964

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

cli.bats

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ setup() {
99
run ./cli.js
1010
[ "$status" -eq 0 ]
1111
[ "${lines[0]}" = "debug-one" ]
12+
[ "${#lines[@]}" = "1" ]
1213
}
1314
}
1415

@@ -17,6 +18,7 @@ setup() {
1718
run ./cli.js
1819
[ "$status" -eq 0 ]
1920
[ "${lines[0]}" = "debug-one" ]
21+
[ "${#lines[@]}" = "1" ]
2022
}
2123
}
2224

@@ -28,6 +30,7 @@ setup() {
2830
[ "${lines[1]}" = "debug-two" ]
2931
[ "${lines[2]}" = "debug-three" ]
3032
[ "${lines[3]}" = "debug-four" ]
33+
[ "${#lines[@]}" = "4" ]
3134
}
3235
}
3336

@@ -41,5 +44,8 @@ setup() {
4144
[ "${lines[3]}" = "debug-four" ]
4245
[ "${lines[4]}" = "info-one" ]
4346
[ "${lines[5]}" = "info-two" ]
47+
[ "${lines[6]}" = "debug-one" ]
48+
[ "${lines[7]}" = "debug-two" ]
49+
[ "${#lines[@]}" = "8" ]
4450
}
4551
}

fixtures/full.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@ Executed successfully.
44
48.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO
55
Execute Anonymous: System.debug('debug-one\ndebug-two');
66
Execute Anonymous: System.debug('debug-three\ndebug-four');
7-
Execute Anonymous: System.debug('debug-five\ndebug-six');
8-
Execute Anonymous: System.debug('debug-seven\ndebug-eight');
9-
Execute Anonymous: System.debug('debug-nine\ndebug-ten');
10-
Execute Anonymous: System.debug('debug-eleven\ndebug-twelve');
11-
Execute Anonymous: System.debug(LoggingLevel.NONE, 'none-one\nnone-two');
12-
Execute Anonymous: System.debug(LoggingLevel.ERROR, 'error-one\nerror-two');
13-
Execute Anonymous: System.debug(LoggingLevel.WARN, 'warn-one\nwarn-two');
147
Execute Anonymous: System.debug(LoggingLevel.INFO, 'info-one\ninfo-two');
158
Execute Anonymous: System.debug(LoggingLevel.DEBUG, 'debug-one\ndebug-two');
16-
Execute Anonymous: System.debug(LoggingLevel.FINE, 'fine-one\nfine-two');
17-
Execute Anonymous: System.debug(LoggingLevel.FINER, 'finer-one\nfiner-two');
18-
Execute Anonymous: System.debug(LoggingLevel.FINEST, 'finest-one\nfinest-two');
199
04:25:21.21 (21632799)|EXECUTION_STARTED
2010
04:25:21.21 (21650642)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex
2111
04:25:21.21 (22596799)|USER_DEBUG|[1]|DEBUG|debug-one

0 commit comments

Comments
 (0)