#!/bin/sh
# Test of mkdr command.
# This should be run in the test subdirectory.

# Get rid of any leftovers from previous test:
/bin/rm -rf tmp/mkdr*

# Make sure there's a tmp directory to work in:
if [ ! -d tmp ]; then
	mkdr tmp
fi
if [ ! -d tmp ]; then
	echo $0: Failed to make tmp
	exit 1 
fi

# Make a single directory
../mkdr tmp/mkdr
if [ -d tmp/mkdr ]
then
	echo $0: Made tmp/mkdr
else
	echo $0: Failed to make tmp/mkdr
	exit 1
fi

# Make three levels of new directory:
../mkdr -p tmp/mkdr/foo/bar/qux
if [ -d tmp/mkdr/foo/bar/qux ];then
	echo $0: Made tmp/mkdr/foo/bar/qux
else
	echo $0: Failed to make tmp/mkdr/foo/bar/qux
	exit 1
fi
