nnn/scripts/test/mktest.sh

41 lines
1.8 KiB
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
}
2017-09-02 12:39:47 +00:00
mkdir -p outdir && cd outdir
2014-10-22 21:12:57 +00:00
echo 'It works!' > normal.txt
2014-11-14 16:12:14 +00:00
echo 'Με δουλέβει;' > 'κοινό.txt'
2017-09-02 12:39:47 +00:00
ln -sf normal.txt ln-normal.txt
ln -sf normal.txt ln-normal
mkdir -p normal-dir
ln -sf normal-dir ln-normal-dir
ln -sf nowhere ln-nowhere
2014-10-22 21:12:57 +00:00
mkfifo mk-fifo
touch no-access && chmod 000 no-access
2017-09-02 12:39:47 +00:00
mkdir -p no-access-dir && chmod 000 no-access-dir
ln -sf ../normal.txt normal-dir/ln-normal.txt
ln -sf ../normal.txt normal-dir/ln-normal
echo 'int main(void) { *((char *)0) = 0; }' > ill.c
make ill > /dev/null
echo 'test/ill' > ill.sh
2017-09-02 12:39:47 +00:00
mkdir -p empty-dir
mkdir -p cage
echo 'chmod 000 test/cage' > cage/lock.sh
echo 'chmod 755 test/cage' > cage-unlock.sh
2017-09-02 12:39:47 +00:00
mkdir -p cage/lion
2015-07-02 00:14:27 +00:00
echo 'chmod 000 test/cage' > cage/lion/lock.sh
2017-09-02 12:39:47 +00:00
mkdir -p unicode
touch 'unicode/Malgudi Days - मालगुडी डेज - E05. Swami and Friends - स्वामी और उसके दोस्त (Part 1)'
touch 'unicode/Malgudi Days - मालगुडी डेज - E05. Swami and Friends - स्वामी और उसके दोस्त (Part 2)'
touch 'unicode/Malgudi Days - मालगुडी डेज - E05. Swami and Friends - स्वामी और उसके दोस्त (Part 3)'
chmod +x 'unicode/Malgudi Days - मालगुडी डेज - E05. Swami and Friends - स्वामी और उसके दोस्त (Part 2)'
touch 'unicode/Führer'
touch 'unicode/Eso eso aamar ghare eso ♫ এসো এসো আমার ঘরে এসো ♫ Swagatalakshmi Dasgupta'
touch 'max_chars_filename_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'