summaryrefslogtreecommitdiffstats
path: root/tests/source.test
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)
commit6ad807858b1217d40a9e5a2c1d5bf241625971ca (patch)
tree429c25c751c106db85c75db6345c91296dc73692 /tests/source.test
parent9e0ab0841248c6ba0cf49036de9005c8d0120a28 (diff)
parent70ea61c893a776323211dbc1d3b5d1d10c7d745e (diff)
downloadtcl-6ad807858b1217d40a9e5a2c1d5bf241625971ca.zip
tcl-6ad807858b1217d40a9e5a2c1d5bf241625971ca.tar.gz
tcl-6ad807858b1217d40a9e5a2c1d5bf241625971ca.tar.bz2
[Bug 3466099] BOM in Unicode
Diffstat (limited to 'tests/source.test')
-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 {