aboutsummaryrefslogtreecommitdiff
path: root/tests/fstype.test
blob: 3df26b19860dd92a947f2d43b202db7e8d04a2ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

[ -f testing.sh ] && . testing.sh

#testing "name" "command" "result" "infile" "stdin"

BDIR="$FILES/blkid"

bzcat "$BDIR"/squashfs.bz2 > temp.img
testing "file" "fstype temp.img" 'squashfs\n' "" ""
rm temp.img

for i in cramfs ext2 ext3 ext4 f2fs ntfs squashfs vfat xfs
do
  testing "$i" 'bzcat "$BDIR"/$i.bz2 | fstype -' "$i\n" "" ""
done

testing "msdos" 'bzcat "$BDIR"/msdos.bz2 | fstype -' 'vfat\n' "" ""
testing "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