summaryrefslogtreecommitdiffstats
path: root/tests/source.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-30 07:46:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-30 07:46:06 (GMT)
commitc02088ad06d8ce8666bd9364c73cd518445efc74 (patch)
treee24f13e7a78b013a6ce505ed696e3d6bba391e89 /tests/source.test
parentcb0b37178a834be6afa969b97ca894a858651ff7 (diff)
parent1f1f43fcd2bfa68c8bff1a9d6dbb8ecab4be43e7 (diff)
downloadtcl-c02088ad06d8ce8666bd9364c73cd518445efc74.zip
tcl-c02088ad06d8ce8666bd9364c73cd518445efc74.tar.gz
tcl-c02088ad06d8ce8666bd9364c73cd518445efc74.tar.bz2
Merge 8.7
Diffstat (limited to 'tests/source.test')
-rw-r--r--tests/source.test24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/source.test b/tests/source.test
index 5441b13..c436317 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -111,7 +111,7 @@ test source-2.7 {utf-8 with BOM} -setup {
} -body {
set out [open $sourcefile w]
fconfigure $out -encoding utf-8
- puts $out "\ufeffset y new-y"
+ puts $out "\uFEFFset y new-y"
close $out
set y old-y
source $sourcefile
@@ -199,7 +199,7 @@ test source-4.1 {continuation line parsing} -setup {
test source-6.1 {source is binary ok} -setup {
# Note [makeFile] writes in the system encoding.
# [source] defaults to reading in the system encoding.
- set sourcefile [makeFile [list set x "a b\0c"] source.file]
+ set sourcefile [makeFile [list set x "a b\x00c"] source.file]
} -body {
set x {}
source $sourcefile
@@ -208,7 +208,7 @@ test source-6.1 {source is binary ok} -setup {
removeFile source.file
} -result 5
test source-6.2 {source skips everything after Ctrl-Z: Bug 2040} -setup {
- set sourcefile [makeFile "set x ab\32c" source.file]
+ set sourcefile [makeFile "set x ab\x1Ac" source.file]
} -body {
set x {}
source $sourcefile
@@ -222,7 +222,7 @@ test source-7.1 {source -encoding test} -setup {
file delete $sourcefile
set f [open $sourcefile w]
fconfigure $f -encoding utf-8
- puts $f "set symbol(square-root) \u221A; set x correct"
+ puts $f "set symbol(square-root) √; set x correct"
close $f
} -body {
set x unset
@@ -233,15 +233,15 @@ test source-7.1 {source -encoding test} -setup {
} -result correct
test source-7.2 {source -encoding test} -setup {
# This tests for bad interactions between [source -encoding]
- # and use of the Control-Z character (\u001A) as a cross-platform
+ # and use of the Control-Z character (\x1A) as a cross-platform
# EOF character by [source]. Here we write out and the [source] a
- # file that contains the byte \x1A, although not the character \u001A in
+ # file that contains the byte \x1A, although not the character \x1A in
# the indicated encoding.
set sourcefile [makeFile {} source.file]
file delete $sourcefile
set f [open $sourcefile w]
fconfigure $f -encoding utf-16
- puts $f "set symbol(square-root) \u221A; set x correct"
+ puts $f "set symbol(square-root) √; set x correct"
close $f
} -body {
set x unset
@@ -266,25 +266,25 @@ test source-7.5 {source -encoding: correct operation} -setup {
file delete $sourcefile
set f [open $sourcefile w]
fconfigure $f -encoding utf-8
- puts $f "proc \u20ac {} {return foo}"
+ puts $f "proc € {} {return foo}"
close $f
} -body {
source $sourcefile
- \u20ac
+ €
} -cleanup {
removeFile source.file
- rename \u20ac {}
+ rename € {}
} -result foo
test source-7.6 {source -encoding: mismatch encoding error} -setup {
set sourcefile [makeFile {} source.file]
file delete $sourcefile
set f [open $sourcefile w]
fconfigure $f -encoding utf-8
- puts $f "proc \u20ac {} {return foo}"
+ puts $f "proc € {} {return foo}"
close $f
} -body {
source -encoding ascii $sourcefile
- \u20ac
+ €
} -cleanup {
removeFile source.file
} -returnCodes error -match glob -result {invalid command name*}