summaryrefslogtreecommitdiffstats
path: root/tests/source.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-19 15:21:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-19 15:21:27 (GMT)
commita09069115b1c5707f85d873526d0d7c9b2ace1fb (patch)
treec5b8bd708483807b0fd532e8596ef564c10fc5fe /tests/source.test
parent7695d3270788d56c1ba433909285dcab42414edb (diff)
downloadtcl-a09069115b1c5707f85d873526d0d7c9b2ace1fb.zip
tcl-a09069115b1c5707f85d873526d0d7c9b2ace1fb.tar.gz
tcl-a09069115b1c5707f85d873526d0d7c9b2ace1fb.tar.bz2
[Bug 3466099] BOM in Unicode
Diffstat (limited to 'tests/source.test')
-rw-r--r--tests/source.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/source.test b/tests/source.test
index 3a1454c..5774a97 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -118,6 +118,21 @@ test source-2.6 {source error conditions} -setup {
{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]
+ set saveencoding [encoding system]
+ encoding system utf-8
+ set out [open $sourcefile w]
+ puts $out "\ufffeset y new-y"
+ close $out
+} -body {
+ set y old-y
+ source $sourcefile
+ set y
+} -cleanup {
+ removeFile source.file
+ encoding system $saveencoding
+} -result {new-y}
test source-3.1 {return in middle of source file} -setup {
set sourcefile [makeFile {