Skip to content

Commit 967e812

Browse files
committed
test: verify underscore usage alongside punctuation
1 parent caae14a commit 967e812

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

test/index.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4537,9 +4537,28 @@ test('roundtrip', async function (t) {
45374537
})
45384538

45394539
await t.test(
4540-
'should roundtrip underscore inside of words',
4540+
'should roundtrip underscore without escaping',
45414541
async function () {
4542-
const value = 'HELLO_WORLD https://some/web_site\n'
4542+
const value = `Separate paragraphs:
4543+
4544+
HELLO_WORLD https://some/web_site
4545+
4546+
HELLO_WORLD-THIS_GOOD
4547+
4548+
HELLO_WORLD. HELLO_WORLD, H_W; HELLO_OTHER! HELLO_YES? HELLO_NO
4549+
4550+
HELLO_WORLD.HELLO_WORLD,H_W;HELLO_OTHER!HELLO_YES?HELLO_NO
4551+
4552+
HELLO_WORLD-THIS_GOOD
4553+
4554+
One Paragraph:
4555+
4556+
HELLO_WORLD https://some/web_site
4557+
HELLO_WORLD-THIS_GOOD
4558+
HELLO_WORLD. HELLO_WORLD, H_W; HELLO_OTHER! HELLO_YES? HELLO_NO
4559+
HELLO_WORLD.HELLO_WORLD,H_W;HELLO_OTHER!HELLO_YES?HELLO_NO
4560+
HELLO_WORLD-THIS_GOOD
4561+
`
45434562

45444563
assert.equal(to(from(value)), value)
45454564
}

0 commit comments

Comments
 (0)