1#!/bin/bash
2
3[ -f testing.sh ] && . testing.sh
4
5#testing "name" "command" "result" "infile" "stdin"
6
7BDIR="$FILES/blkid"
8
9bzcat "$BDIR"/squashfs.bz2 > temp.img
10testing "file" "fstype temp.img" 'squashfs\n' "" ""
11rm temp.img
12
13for i in cramfs ext2 ext3 ext4 f2fs ntfs squashfs vfat xfs
14do
15  testing "$i" 'bzcat "$BDIR"/$i.bz2 | fstype -' "$i\n" "" ""
16done
17
18testing "msdos" 'bzcat "$BDIR"/msdos.bz2 | fstype -' 'vfat\n' "" ""
19testing "reiserfs" 'bzcat "$BDIR"/reiser3.bz2 | fstype -' 'reiserfs\n' "" ""
20
21#testing "blkid minix" 'bzcat "$BDIR"/minix.bz2 | blkid -'
22#adfs bfs btrfs cramfs jfs nilfs romfs
23#vfat  // fat32 fat12 fat16
24