Annotation of parser3/tests/344.html, revision 1.4

1.1       moko        1: @main[]
                      2: ^from-1251[]
                      3: 
                      4: $f1[^file::load[binary;247_utf8_bom.txt]]
                      5: ^show[f1;$f1]
                      6: 
                      7: $f[^file::create[$f1; $.mode[text] ]]
                      8: ^show[f text from binary, automatic transcode by UTF-8 preambule;$f]
                      9: 
1.2       moko       10: $f[^file::create[$f1; $.mode[text] $.content-type[text/plain^; charset=Windows-1251] ]]
                     11: ^show[f text from binary no transcode as charset specified in content-type;$f]
                     12: 
                     13: $f[^file::create[$f1; $.mode[text] $.from-charset[Windows-1251] ]]
                     14: ^show[f text from binary no transcode as from-charset specified;$f]
                     15: 
                     16: $f1[^file::load[binary;247_utf8.txt]]
                     17: ^show[f1;$f1]
                     18: 
                     19: $f[^file::create[$f1; $.mode[text] ]]
                     20: ^show[f text from binary, no transcode;$f]
                     21: 
                     22: $f[^file::create[$f1; $.mode[text] $.from-charset[UTF-8] ]]
                     23: ^show[f text from binary transcode using from-charset;$f]
                     24: 
1.3       moko       25: ^try-catch{ ^file::create[$f1; $.to-charset[UTF-8] $.charset[UTF-8] ] }
                     26: 
1.4     ! moko       27: code coverage tests:
        !            28: 
        !            29: $f1[^file::load[text;247_utf8_bom.txt; $.limit[8] $.offset[5] $.charset[UTF-8] ]]
        !            30: ^show[f1;$f1]
        !            31: 
        !            32: 
1.1       moko       33: @show[title;f]
1.3       moko       34: $title : {
                     35: "name":"$f.name",
                     36: "size":$f.size,
                     37: "mode":"$f.mode",
                     38: "content-type":"^taint[json;$f.content-type]",
                     39: "text":"$f.text"
                     40: }

E-mail: