Tap escaping not consistent with and without --test
#45836
Closed
Description
Version
v20.0.0-pre
Platform
Darwin Moshes-MBP.localdomain 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
Subsystem
test_runner
What steps will reproduce the bug?
create test.js
const test = require('node:test');
test('escaped description \\ # \\#\\ \n \t \f \v \b \r');
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
when running without --test
:
node test.js
TAP version 13
# Subtest: escaped description \\ \# \\\#\\ \n \t \f \v \b \r
ok 1 - escaped description \\ \# \\\#\\ \n \t \f \v \b \r
---
duration_ms: 1.318167
...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 3.680459
What do you see instead?
when running with --test
node --test test.js
TAP version 13
# Subtest: /Users/moshe/repos/node/a.js
# Subtest: escaped description \\ \# \\\#\\ n \\t f \\v b \\r
ok 1 - escaped description \\ \# \\\#\\ n \\t f \\v b \\r
---
duration_ms: 1.295459
...
1..1
ok 1 - /Users/moshe/repos/node/a.js
---
duration_ms: 80.91975
...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 81.80225
Additional information
No response
Activity