diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:56:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-02-29 21:56:20 (GMT) |
commit | 0577a820e8379d4a23080245cd45004f927c0f36 (patch) | |
tree | 982b5959dd17b61c8f3b21f473dfbe426b40cfb6 /tests/source.test | |
parent | 99e6f923a2de1eba4f8fc862712359015e13d0f8 (diff) | |
parent | 4c1377ed5aa3f0187be137f191a760ea2c9c2f18 (diff) | |
download | tcl-0577a820e8379d4a23080245cd45004f927c0f36.zip tcl-0577a820e8379d4a23080245cd45004f927c0f36.tar.gz tcl-0577a820e8379d4a23080245cd45004f927c0f36.tar.bz2 |
[Bug 3466099] BOM in Unicode
Diffstat (limited to 'tests/source.test')
-rw-r--r-- | tests/source.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/source.test b/tests/source.test index 081a129..9d09429 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 { |