nnn/mktest.sh

26 lines
588 B
Bash
Raw Normal View History

2014-10-22 21:12:57 +00:00
#!/bin/sh
# Create test files and directories
test -e test && {
echo "Remove test and try again"
exit 1
}
mkdir test && cd test
echo 'It works!' > normal.txt
2014-11-14 16:12:14 +00:00
echo 'Με δουλέβει;' > 'κοινό.txt'
2014-10-22 21:12:57 +00:00
ln -s normal.txt ln-normal.txt
ln -s normal.txt ln-normal
mkdir normal-dir
ln -s normal-dir ln-normal-dir
ln -s nowhere ln-nowhere
mkfifo mk-fifo
touch no-access && chmod 000 no-access
ln -s ../normal.txt normal-dir/ln-normal.txt
ln -s ../normal.txt normal-dir/ln-normal
echo 'int main(void) { *((char *)0) = 0; }' > ill.c
make ill > /dev/null
echo 'test/ill' > ill.sh