1# zipinfo tests. 2 3# Note: since "master key", Android uses libziparchive for all zip file 4# handling, and that scans the whole central directory immediately. Not only 5# lookups by name but also iteration is implemented using the resulting hash 6# table, meaning that any test that makes assumptions about iteration order 7# will fail on Android. 8 9name: zipinfo -1 10command: zipinfo -1 $FILES/example.zip | sort 11expected-stdout: 12 d1/ 13 d1/d2/a.txt 14 d1/d2/b.txt 15 d1/d2/c.txt 16 d1/d2/dir/ 17 d1/d2/empty.txt 18 d1/d2/x.txt 19--- 20 21name: zipinfo header 22command: zipinfo $FILES/example.zip | head -2 23expected-stdout: 24 Archive: $FILES/example.zip 25 Zip file size: 1082 bytes, number of entries: 7 26--- 27 28name: zipinfo footer 29command: zipinfo $FILES/example.zip | tail -1 30expected-stdout: 31 7 files, 1033 bytes uncompressed, 20 bytes compressed: 98.1% 32--- 33 34name: zipinfo directory 35# The RI doesn't use ISO dates. 36command: zipinfo $FILES/example.zip d1/ | sed s/17-Jun-/2017-06-/ 37expected-stdout: 38 drwxr-x--- 3.0 unx 0 bx stor 2017-06-04 08:40 d1/ 39--- 40 41name: zipinfo stored 42# The RI doesn't use ISO dates. 43command: zipinfo $FILES/example.zip d1/d2/empty.txt | sed s/17-Jun-/2017-06-/ 44expected-stdout: 45 -rw-r----- 3.0 unx 0 bx stor 2017-06-04 08:43 d1/d2/empty.txt 46--- 47 48name: zipinfo deflated 49# The RI doesn't use ISO dates. 50command: zipinfo $FILES/example.zip d1/d2/x.txt | sed s/17-Jun-/2017-06-/ 51expected-stdout: 52 -rw-r----- 3.0 unx 1024 tx defN 2017-06-04 08:45 d1/d2/x.txt 53--- 54