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 | 336410f92239eecba4d739de6e5b67cf02990694 (patch) | |
tree | 982b5959dd17b61c8f3b21f473dfbe426b40cfb6 /tests/source.test | |
parent | f3bdd208ac10cfe9a475b0689677acd542debee2 (diff) | |
parent | 6ad807858b1217d40a9e5a2c1d5bf241625971ca (diff) | |
download | tcl-336410f92239eecba4d739de6e5b67cf02990694.zip tcl-336410f92239eecba4d739de6e5b67cf02990694.tar.gz tcl-336410f92239eecba4d739de6e5b67cf02990694.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 { |