From f84fb697ca55a9476a7c46e2b18afd31f3dd1dc7 Mon Sep 17 00:00:00 2001 From: Larsimusrex Date: Wed, 3 Sep 2025 17:41:42 +0200 Subject: [PATCH] fix test that broke because of different escaping --- vlib/toml/tests/testdata/json_encoding_test.out | 2 +- vlib/v/gen/js/sourcemap/basic_test.v | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/toml/tests/testdata/json_encoding_test.out b/vlib/toml/tests/testdata/json_encoding_test.out index 63e8d36c7a..ff2bf2bb88 100644 --- a/vlib/toml/tests/testdata/json_encoding_test.out +++ b/vlib/toml/tests/testdata/json_encoding_test.out @@ -1 +1 @@ -{ "\u3072\u3089\u304c\u306a": "\u3072\u3089" } \ No newline at end of file +{ "ひらがな": "ひら" } \ No newline at end of file diff --git a/vlib/v/gen/js/sourcemap/basic_test.v b/vlib/v/gen/js/sourcemap/basic_test.v index d0ab9b636d..6497063597 100644 --- a/vlib/v/gen/js/sourcemap/basic_test.v +++ b/vlib/v/gen/js/sourcemap/basic_test.v @@ -132,7 +132,7 @@ fn test_simple() { 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 } @@ -153,6 +153,6 @@ fn test_source_null() { }, 3, 1, '') 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 }