]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/regression/msdosfs/msdosfstest-3.sh
zfs: merge openzfs/zfs@804414aad
[FreeBSD/FreeBSD.git] / tools / regression / msdosfs / msdosfstest-3.sh
1 #!/bin/sh
2 # A really simple script to create a swap-backed msdosfs filesystem, then
3 # test to make sure the mbnambuf optimisation(msdosfs_conv.c rev 1.40)
4 # doesn't break multi-byte characters.
5
6 mkdir /tmp/msdosfstest/
7 mdconfig -a -t swap -s 128m -u 10
8 bsdlabel -w md10 auto
9 newfs_msdos -F 16 -b 8192 /dev/md10a
10 mount_msdosfs -L zh_TW.Big5 -D CP950 /dev/md10a /tmp/msdosfstest/
11 # The comment is UTF-8, the actual command uses the Big5 representation.
12 # mkdir /tmp/msdosfstest/012345678_邪惡之美
13 mkdir /tmp/msdosfstest/012345678_$'\250\270\264\143\244\247\254\374'
14 cd /tmp/msdosfstest/012345678_$'\250\270\264\143\244\247\254\374'
15 if [ $? -eq 0 ]; then
16         echo "ok 3";
17 else
18         echo "not ok 3";
19 fi
20 cd /tmp
21 umount /tmp/msdosfstest/
22 mdconfig -d -u 10
23 rmdir /tmp/msdosfstest/