# Should not be run on Windows
NAME=utf8 (possibly malformed) filenames with non-printable chars
FILE==
CMDS=<<EOF
cd `e dir.tmp`
e io.cache=true
(show_fname fname; wz ${fname}; prz `$b` > `prz`; o `prz`; i~file; ij; rm `prz`)
.(show_fname A\x1b¢\302\200€𝄞\363\240\201\201\\.bin)
.(show_fname B\x1b¢\302\200€𝄞\363\240\201\201\\.bin)
# INVALID FILENAME .(show_fname B\x1b¢\302\200\201€𝄞\363\240\201\201\\.bin)
EOF
EXPECT=<<EOF
file    A\e¢€𝄞󠁁\.bin
{"core":{"file":"A\u001b¢\u0080€𝄞\udb40\udc41\\.bin","fd":4,"size":22,"humansz":"22","iorw":true,"mode":"r-x","block":256,"format":"any"}}
file    B\e¢€𝄞󠁁\.bin
{"core":{"file":"B\u001b¢\u0080€𝄞\udb40\udc41\\.bin","fd":5,"size":22,"humansz":"22","iorw":true,"mode":"r-x","block":256,"format":"any"}}
EOF
RUN
