OSDN Git Service

basename: fix segfault on null input; add tests
[android-x86/external-toybox.git] / tests / fstype.test
1 #!/bin/bash
2
3 [ -f testing.sh ] && . testing.sh
4
5 #testing "name" "command" "result" "infile" "stdin"
6
7 BDIR="$FILES/blkid"
8
9 bzcat "$BDIR"/squashfs.bz2 > temp.img
10 testing "file" "fstype temp.img" 'squashfs\n' "" ""
11 rm temp.img
12
13 for i in cramfs ext2 ext3 ext4 f2fs ntfs squashfs vfat xfs
14 do
15   testing "$i" 'bzcat "$BDIR"/$i.bz2 | fstype -' "$i\n" "" ""
16 done
17
18 testing "msdos" 'bzcat "$BDIR"/msdos.bz2 | fstype -' 'vfat\n' "" ""
19 testing "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