Skip to content

Commit f06e4cd

Browse files
authored
Fix test_utf under minimal runtime (#24278)
As part of this I extended the out/err handlers for MINIMAL_RUNTIME to support multiple arguments. Previously they would just drop extras args.
1 parent 12396df commit f06e4cd

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,9 @@ jobs:
646646
wasmfs.test_fcntl_open
647647
wasmfs.test_fs_llseek
648648
wasmfs.test_fs_llseek_rawfs
649-
wasmfs.test_freetype"
649+
wasmfs.test_freetype
650+
minimal0.test_utf
651+
"
650652
test-wasm2js1:
651653
environment:
652654
EMTEST_SKIP_NODE_CANARY: "1"

src/shell_minimal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ if (ENVIRONMENT_IS_NODE) {
117117
var out = defaultPrint;
118118
var err = defaultPrintErr;
119119
#else
120-
var out = (text) => console.log(text);
121-
var err = (text) => console.error(text);
120+
var out = (...args) => console.log(...args);
121+
var err = (...args) => console.error(...args);
122122
#endif
123123

124124
// Override this function in a --pre-js file to get a signal for when

test/code_size/embind_hello_wasm.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"a.html": 552,
33
"a.html.gz": 380,
4-
"a.js": 9000,
5-
"a.js.gz": 3957,
4+
"a.js": 9005,
5+
"a.js.gz": 3961,
66
"a.wasm": 7332,
77
"a.wasm.gz": 3369,
8-
"total": 16884,
9-
"total_gz": 7706
8+
"total": 16889,
9+
"total_gz": 7710
1010
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"a.html": 12490,
3-
"a.html.gz": 6832,
4-
"total": 12490,
5-
"total_gz": 6832
2+
"a.html": 12506,
3+
"a.html.gz": 6840,
4+
"total": 12506,
5+
"total_gz": 6840
66
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"a.html": 17170,
3-
"a.html.gz": 7510,
4-
"total": 17170,
5-
"total_gz": 7510
2+
"a.html": 17186,
3+
"a.html.gz": 7515,
4+
"total": 17186,
5+
"total_gz": 7515
66
}

test/test_core.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5615,8 +5615,6 @@ def test_utime(self):
56155615
def test_futimens(self):
56165616
self.do_runf('utime/test_futimens.c', 'success')
56175617

5618-
@no_minimal_runtime('MINIMAL_RUNTIME does not have getValue() and setValue() (TODO add it to a JS library function to get it in)')
5619-
@requires_node # only node handles utf well
56205618
def test_utf(self):
56215619
self.set_setting('EXPORTED_RUNTIME_METHODS', ['getValue', 'setValue', 'UTF8ToString', 'stringToUTF8OnStack'])
56225620
self.do_core_test('test_utf.c')

0 commit comments

Comments
 (0)