[Toybox] [PATCH] file: add GIF version information.
Rob Landley
rob at landley.net
Wed Jun 17 13:56:33 PDT 2020
On 6/16/20 11:35 AM, enh via Toybox wrote:
> This let me compare against the host for #225.
> ---
> tests/file.test | 2 +-
> toys/posix/file.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
Applied, but:
$ VERBOSE=1 TEST_HOST=1 make test_file
scripts/test.sh file
PASS: file directory
PASS: file empty
PASS: file bash.script
PASS: file bash.script with spaces
FAIL: file env python script
echo -ne '' | file env.python.script
--- expected 2020-06-17 15:55:29.193322185 -0500
+++ actual 2020-06-17 15:55:29.193322185 -0500
@@ -1 +1 @@
-env.python.script: python script
+env.python.script: script text executable for /usr/bin/env python, ASCII text
PASS: file ascii
FAIL: file utf-8
echo -ne '' | file /home/landley/toybox/toybox/tests/files/utf8/japan.txt | sed
's|/home/landley/toybox/toybox/tests/files/||'
--- expected 2020-06-17 15:55:29.205322186 -0500
+++ actual 2020-06-17 15:55:29.213322186 -0500
@@ -1 +1 @@
-utf8/japan.txt: UTF-8 text
+utf8/japan.txt: UTF-8 Unicode text, with no line terminators
FAIL: file java class
echo -ne '' | file /home/landley/toybox/toybox/tests/files/java.class | sed
's|/home/landley/toybox/toybox/tests/files/||'
--- expected 2020-06-17 15:55:29.217322186 -0500
+++ actual 2020-06-17 15:55:29.217322186 -0500
@@ -1 +1 @@
-java.class: Java class file, version 53.0 (Java 1.9)
+java.class: compiled Java class data, version 53.0
PASS: file tar file
FAIL: file gzip data
echo -ne '' | file /home/landley/toybox/toybox/tests/files/tar/tar.tgz | sed
's|/home/landley/toybox/toybox/tests/files/||'
--- expected 2020-06-17 15:55:29.225322186 -0500
+++ actual 2020-06-17 15:55:29.229322186 -0500
@@ -1 +1 @@
-tar/tar.tgz: gzip compressed data
+tar/tar.tgz: gzip compressed data, last modified: Sat May 13 01:06:16 2017,
from Unix
PASS: file bzip2 data
PASS: file 7z file
FAIL: file zip file
echo -ne '' | file /home/landley/toybox/toybox/tests/files/zip/example.zip | sed
's|/home/landley/toybox/toybox/tests/files/||'
--- expected 2020-06-17 15:55:29.241322186 -0500
+++ actual 2020-06-17 15:55:29.245322186 -0500
@@ -1 +1 @@
-zip/example.zip: Zip archive data, requires at least v1.0 to extract
+zip/example.zip: Zip archive data, at least v1.0 to extract
PASS: file gif file
FAIL: file Android .dex
echo -ne '' | file android.dex
--- expected 2020-06-17 15:55:29.257322186 -0500
+++ actual 2020-06-17 15:55:29.257322186 -0500
@@ -1 +1 @@
-android.dex: Android dex file, version 035
+android.dex: Dalvik dex file version 035
SKIP: file Android NDK full ELF note
SKIP: file Android NDK short ELF note
PASS: file broken symlink
PASS: file symlink
PASS: file symlink -h
FAIL: file symlink -L
echo -ne '' | file -L symlink
--- expected 2020-06-17 15:55:29.285322187 -0500
+++ actual 2020-06-17 15:55:29.285322187 -0500
@@ -1 +1 @@
-symlink: Java class file, version 53.0 (Java 1.9)
+symlink: compiled Java class data, version 53.0
FAIL: file - pipe
echo -ne '' | cat /home/landley/toybox/toybox/tests/files/java.class | file -
--- expected 2020-06-17 15:55:29.289322187 -0500
+++ actual 2020-06-17 15:55:29.289322187 -0500
@@ -1 +1 @@
--: Java class file, version 53.0 (Java 1.9)
+/dev/stdin: compiled Java class data, version 53.0
FAIL: file - redirect
echo -ne '' | file - </home/landley/toybox/toybox/tests/files/java.class
--- expected 2020-06-17 15:55:29.293322187 -0500
+++ actual 2020-06-17 15:55:29.297322187 -0500
@@ -1 +1 @@
--: Java class file, version 53.0 (Java 1.9)
+/dev/stdin: compiled Java class data, version 53.0
PASS: file /dev/zero
FAIL: file - </dev/zero
echo -ne '' | file - </dev/zero
--- expected 2020-06-17 15:55:29.305322187 -0500
+++ actual 2020-06-17 15:55:29.317322187 -0500
@@ -1 +1 @@
--: data
+/dev/stdin: data
.singlemake:1493: recipe for target 'test_file' failed
make: *** [test_file] Error 1
Rob
More information about the Toybox
mailing list