]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/regression/msdosfs/msdosfstest-6.sh
MFV: zlib 1.3
[FreeBSD/FreeBSD.git] / tools / regression / msdosfs / msdosfstest-6.sh
1 #!/bin/sh
2 # A really simple script to create a swap-backed msdosfs filesystem, then
3 # test to make sure the nmount conversion(mount_msdosfs.c rev 1.37)
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 32 -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/是否看過坊間常見的許茹芸淚海慶功宴吃蓋飯第四集
13 subdir=$'\254\117\247\137\254\335\271\114\247\173\266\241\261\140\250\243'\
14 $'\252\272\263\134\257\370\252\345\262\134\256\374\274\171\245\134'\
15 $'\256\142\246\131\273\134\266\272\262\304\245\174\266\260'
16 mkdir /tmp/msdosfstest/$subdir
17 cd /tmp/msdosfstest/$subdir
18 if [ $? -eq 0 ]; then
19         echo "ok 6";
20 else
21         echo "not ok 6";
22 fi
23 cd /tmp
24 umount /tmp/msdosfstest/
25 mdconfig -d -u 10
26 rm -rf /tmp/msdosfstest/