211bed7aimura# $FreeBSD$
311bed7aimura# A really simple script to create a swap-backed msdosfs filesystem, then
411bed7aimura# test to see if msdosfs_conv.c rev 1.45[1] works properly.
611bed7aimuramkdir /tmp/msdosfstest
711bed7aimuramdconfig -a -t swap -s 128m -u 10
811bed7aimurabsdlabel -w md10 auto
911bed7aimuranewfs_msdos -F 16 -b 8192 /dev/md10a
1011bed7aimuramount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
113060727uqs# The comment is UTF-8, the actual command uses the KOI8-U representation.
123060727uqs# mkdir /tmp/msdosfstest/�� (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
133060727uqsmkdir /tmp/msdosfstest/$'\246'
1411bed7aimuraif [ $? -eq 0 ]; then
1511bed7aimura	echo "ok 4 (pass stage 1/3)"
163060727uqs	cd /tmp/msdosfstest/$'\246'
1711bed7aimura	if [ $? -eq 0 ]; then
1811bed7aimura		echo "ok 4 (pass stage 2/3)"
1911bed7aimura		cd /tmp
2011bed7aimura		umount /tmp/msdosfstest
2111bed7aimura		mount_msdosfs -L uk_UA.KOI8-U -D CP866 -s /dev/md10a /tmp/msdosfstest
2211bed7aimura		cd /tmp/msdosfstest/_~1
2311bed7aimura		if [ $? -eq 0 ]; then
2411bed7aimura			echo "ok 4 (pass stage 3/3)"
2511bed7aimura		else
2611bed7aimura			echo "not ok 4"
2711bed7aimura		fi
2811bed7aimura	else
2911bed7aimura		echo "not ok 4"
3011bed7aimura	fi
3211bed7aimura	echo "not ok 4"
3411bed7aimuracd /tmp
3511bed7aimuraumount /tmp/msdosfstest
3611bed7aimuramdconfig -d -u 10
3711bed7aimurarmdir /tmp/msdosfstest