fix test that broke because of different escaping

This commit is contained in:
Larsimusrex 2025-09-03 17:41:42 +02:00
parent f74867ba13
commit f84fb697ca
2 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
{ "\u3072\u3089\u304c\u306a": "\u3072\u3089" } { "ひらがな": "ひら" }

View file

@ -132,7 +132,7 @@ fn test_simple() {
json_data := sm.to_json() json_data := sm.to_json()
expected := '{"version":3,"file":"hello.js","sourceRoot":"\\/","sources":["hello.v"],"sourcesContent":["fn main(){nprintln(\'Hello World! Helo \$a\')\\n}"],"names":["hello_name"],"mappings":"AAAA;AAAA,EAAA,OAAO,CAACA,GAAR,CAAY,aAAZ,CAAA,CAAA;AAAA"}' expected := '{"version":3,"file":"hello.js","sourceRoot":"/","sources":["hello.v"],"sourcesContent":["fn main(){nprintln(\'Hello World! Helo \$a\')\\n}"],"names":["hello_name"],"mappings":"AAAA;AAAA,EAAA,OAAO,CAACA,GAAR,CAAY,aAAZ,CAAA,CAAA;AAAA"}'
assert json_data.str() == expected assert json_data.str() == expected
} }
@ -153,6 +153,6 @@ fn test_source_null() {
}, 3, 1, '') }, 3, 1, '')
json_data := sm.to_json() json_data := sm.to_json()
expected := '{"version":3,"file":"hello.js","sourceRoot":"\\/","sources":["hello.v","hello_lib1.v","hello_lib2.v"],"sourcesContent":[null,null,null],"names":[],"mappings":"CA+\\/\\/\\/\\/\\/HA;CCAA;CCAA"}' expected := '{"version":3,"file":"hello.js","sourceRoot":"/","sources":["hello.v","hello_lib1.v","hello_lib2.v"],"sourcesContent":[null,null,null],"names":[],"mappings":"CA+/////HA;CCAA;CCAA"}'
assert json_data.str() == expected assert json_data.str() == expected
} }