fstype.test 627 B

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