summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-29 21:34:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-29 21:34:46 (GMT)
commit4c1377ed5aa3f0187be137f191a760ea2c9c2f18 (patch)
tree429c25c751c106db85c75db6345c91296dc73692 /tests
parentfbbaada7c6f41c2d812462097bb2bd959e516491 (diff)
parenta1416a6c397598835f3c599368c200d6e5402223 (diff)
downloadtcl-4c1377ed5aa3f0187be137f191a760ea2c9c2f18.zip
tcl-4c1377ed5aa3f0187be137f191a760ea2c9c2f18.tar.gz
tcl-4c1377ed5aa3f0187be137f191a760ea2c9c2f18.tar.bz2
[Bug 3466099] BOM in Unicode
Diffstat (limited to 'tests')
-rw-r--r--tests/source.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/source.test b/tests/source.test
index 9162e8e..e79b211 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -107,6 +107,19 @@ test source-2.6 {source error conditions} -setup {
} -match listGlob -result [list 1 \
{couldn't read file "*_non_existent_": no such file or directory} \
{POSIX ENOENT {no such file or directory}}]
+test source-2.7 {utf-8 with BOM} -setup {
+ set sourcefile [makeFile {} source.file]
+} -body {
+ set out [open $sourcefile w]
+ fconfigure $out -encoding utf-8
+ puts $out "\ufffeset y new-y"
+ close $out
+ set y old-y
+ source -encoding utf-8 $sourcefile
+ return $y
+} -cleanup {
+ removeFile $sourcefile
+} -result {new-y}
test source-3.1 {return in middle of source file} -setup {
set sourcefile [makeFile {