Debian Codegraph @

tests/019_test_filename_with_space.sh

raw symbols SCIP
1 #!/bin/bash
2 # test that things are working as expected, with filename with space
3 # add a test for quote as well.
4 #
5 # Requires a installed cowdancer, and will test the installed cowdancer.
6
7 set -ex
8
9 TESTDIR=$(mktemp -d )
10
11 cd ${TESTDIR}
12 mkdir 1/
13
14 # make a few files for testing.
15 touch "1/a'f" "1/b g" "1/c h" "1/d i"
16 dd if=/dev/zero of="1/e j" bs=512 count=2
17
18 ls -li 1/ > ls.prev
19
20 sleep 1s
21
22 cp -al 1/ 2
23
24 echo " 2/ before"
25 ls -li 2/
26 echo "cd 2 && echo a > \"a'f\" && mv 'b g' 'c h' && touch 'c h' && dd if='e j' of='d i'" | cow-shell
27 echo " 2/ after"
28 ls -li 2/
29
30 rm -rf 2/
31
32 ls -li 1/ > ls.after
33
34
35 echo " 1/ differences; should not exist"
36 diff -u ls.prev ls.after
37
38 rm -rf ${TESTDIR}