diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:17:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:17:35 (GMT) |
commit | a1416a6c397598835f3c599368c200d6e5402223 (patch) | |
tree | 73adf39b2338a6a278e999cfa368b35c224c87d3 /tests/source.test | |
parent | e808998f32299b76b5d72c1eeab0c61d7b39912e (diff) | |
parent | 400babcc66dc63cb96cb3b3e2bc1df6dc6ad1a7e (diff) | |
download | tcl-a1416a6c397598835f3c599368c200d6e5402223.zip tcl-a1416a6c397598835f3c599368c200d6e5402223.tar.gz tcl-a1416a6c397598835f3c599368c200d6e5402223.tar.bz2 |
[Bug 3466099] BOM in Unicode
Diffstat (limited to 'tests/source.test')
-rw-r--r-- | tests/source.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/source.test b/tests/source.test index 3a1454c..1e5b732 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] +} -body { + encoding system utf-8 + set out [open $sourcefile w] + puts $out "\ufffeset y new-y" + close $out + set y old-y + source $sourcefile + return $y +} -cleanup { + removeFile $sourcefile + encoding system $saveencoding +} -result {new-y} test source-3.1 {return in middle of source file} -setup { set sourcefile [makeFile { |