mirror of
https://github.com/imjasonh/testscript-rs
synced 2026-07-08 17:16:38 +00:00
Add explicit Unicode mode to regex patterns for proper Unicode handling (#40)
This commit is contained in:
parent
2dfdbc818d
commit
d059265fa1
11 changed files with 40 additions and 4 deletions
3
testdata/unicode_dot_regex.txt
vendored
Normal file
3
testdata/unicode_dot_regex.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test if . in regex matches Unicode characters
|
||||
exec echo "A✓B"
|
||||
stdout "A.B"
|
||||
3
testdata/unicode_emoji.txt
vendored
Normal file
3
testdata/unicode_emoji.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test emoji in output
|
||||
exec echo "Status: 🎉 Success!"
|
||||
stdout "Status: 🎉 Success!"
|
||||
6
testdata/unicode_grep.txt
vendored
Normal file
6
testdata/unicode_grep.txt
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Test grep command with Unicode content
|
||||
grep "Success.*✓" test.txt
|
||||
stdout "test.txt:1: Success ✓"
|
||||
|
||||
-- test.txt --
|
||||
Success ✓
|
||||
3
testdata/unicode_multiple.txt
vendored
Normal file
3
testdata/unicode_multiple.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test multiple Unicode characters
|
||||
exec echo "Tests: ✓ ✗ ⚠ ℹ"
|
||||
stdout "Tests: ✓ ✗ ⚠ ℹ"
|
||||
3
testdata/unicode_regex.txt
vendored
Normal file
3
testdata/unicode_regex.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test Unicode in regex pattern
|
||||
exec echo "Success ✓ completed"
|
||||
stdout "Success .* completed"
|
||||
3
testdata/unicode_special_chars.txt
vendored
Normal file
3
testdata/unicode_special_chars.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test Unicode with regex special characters
|
||||
exec echo "Result: ✓ (success)"
|
||||
stdout "Result: ✓ \(success\)"
|
||||
3
testdata/unicode_stderr.txt
vendored
Normal file
3
testdata/unicode_stderr.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test Unicode checkmark in stderr exact match
|
||||
exec sh -c 'echo "Error ✗" >&2'
|
||||
stderr "Error ✗"
|
||||
3
testdata/unicode_stdout.txt
vendored
Normal file
3
testdata/unicode_stdout.txt
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Test Unicode checkmark in stdout exact match
|
||||
exec echo "Success ✓"
|
||||
stdout "Success ✓"
|
||||
Loading…
Add table
Add a link
Reference in a new issue