From b73d9a2ac127984380ce6bfa32e00817985b6269 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 2 Mar 2016 14:29:03 -0600 Subject: Add fstype test. --- tests/fstype.test | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tests/fstype.test 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 -- cgit v1.2.3