1# Should not be run on Windows
2NAME=utf8 (possibly malformed) filenames with non-printable chars
3FILE=-
4CMDS=<<EOF
5cd `e dir.tmp`
6e io.cache=true
7"(show_fname fname; wz $0; wtf `prz`; o `prz`; i~file; ij; rm `prz`)"
8.(show_fname A\x1b¢\302\200€��\363\240\201\201\\.bin)
9.(show_fname B\x1b¢\302\200€��\363\240\201\201\\.bin)
10# INVALID FILENAME .(show_fname B\x1b¢\302\200\200€��\363\240\201\201\\.bin)
11EOF
12EXPECT=<<EOF
13file     A\x1b¢€€����\.bin
14{"core":{"type":"","file":"A\u001b¢\u0080€��\udb40\udc41\\.bin","fd":4,"size":256,"humansz":"256","iorw":true,"mode":"r-x","block":256,"format":"any"}}
15file     B\x1b¢€€����\.bin
16{"core":{"type":"","file":"B\u001b¢\u0080€��\udb40\udc41\\.bin","fd":5,"size":256,"humansz":"256","iorw":true,"mode":"r-x","block":256,"format":"any"}}
17EOF
18RUN
19