aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-03-02 14:29:03 -0600
committerRob Landley <rob@landley.net>2016-03-02 14:29:03 -0600
commitb73d9a2ac127984380ce6bfa32e00817985b6269 (patch)
tree5363fd85a6797f007433383f089ebf75f1b20b4c
parent9ef6fbfc2bdc32be2a94040337f9b7fef5c18554 (diff)
downloadtoybox-b73d9a2ac127984380ce6bfa32e00817985b6269.tar.gz
Add fstype test.
-rwxr-xr-xtests/fstype.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/fstype.test b/tests/fstype.test
new file mode 100755
index 00000000..cf0987ad
--- /dev/null
+++ b/tests/fstype.test
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+[ -f testing.sh ] && . testing.sh
+
+#testing "name" "command" "result" "infile" "stdin"
+
+BDIR="$TOPDIR/tests/blkid"
+
+bzcat "$BDIR"/squashfs.bz2 > temp.img
+testing "fstype file" "fstype temp.img" 'squashfs\n' "" ""
+rm temp.img
+
+for i in cramfs ext2 ext3 ext4 f2fs ntfs squashfs vfat xfs
+do
+ testing "fstype $i" 'bzcat "$BDIR"/$i.bz2 | fstype -' "$i\n" "" ""
+done
+
+testing "fstype msdos" 'bzcat "$BDIR"/msdos.bz2 | fstype -' 'vfat\n' "" ""
+testing "fstype reiserfs" 'bzcat "$BDIR"/reiser3.bz2 | fstype -' 'reiserfs\n' "" ""
+
+#testing "blkid minix" 'bzcat "$BDIR"/minix.bz2 | blkid -'
+#adfs bfs btrfs cramfs jfs nilfs romfs
+#vfat // fat32 fat12 fat16