-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathrun-toml-test.bash
More file actions
executable file
·32 lines (28 loc) · 1.22 KB
/
run-toml-test.bash
File metadata and controls
executable file
·32 lines (28 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# Requires toml-test from https://github.com/toml-lang/toml-test, commit 291644c or newer (Apr 2025).
skip_decode=(
# Invalid UTF-8 strings are not rejected
-skip='invalid/encoding/bad-utf8-*'
# Certain invalid UTF-8 codepoints are not rejected
-skip='invalid/encoding/bad-codepoint'
-skip='invalid/string/bad-uni-esc-6'
-skip='invalid/string/bad-uni-esc-06'
-skip='invalid/string/bad-uni-esc-ml-6'
-skip='invalid/string/bad-uni-esc-ml-06'
# JS* doesn't reject invalid dates, but interprets extra days such as "Feb 30 2023" as "Feb 28 2023 +2d" gracefully.
#
# *This is true for V8, SpiderMonkey, and JavaScriptCore. Note that this behavior is implementation specific and
# certain flavors of engines may behave differently.
#
# While smol-toml could implement additional checks, this has not been done for performance reasons
-skip='invalid/local-date/feb-29'
-skip='invalid/local-datetime/feb-29'
-skip='invalid/datetime/feb-29'
-skip='invalid/local-date/feb-30'
-skip='invalid/local-datetime/feb-30'
-skip='invalid/datetime/feb-30'
-skip='invalid/datetime/offset-overflow-hour'
)
toml-test test -toml=1.1 ${skip_decode[@]} \
-decoder="node ./toml-test-parse.mjs" \
-encoder="node ./toml-test-encode.mjs"