Debian Codegraph @

tests/019_test_filename_with_space.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/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=$(mktempscip-shell system . . mktemp. -d )
10
11 cd ${TESTDIR}
12 mkdirscip-shell system . . mkdir. 1/
13
14 # make a few files for testing.
15 touchscip-shell system . . touch. "1/a'f" "1/b g" "1/c h" "1/d i"
16 ddscip-shell system . . dd. if=/dev/zeroscip-shell filesystem . . `/dev/zero`. of="1/e j" bs=512 count=2
17
18 lsscip-shell system . . ls. -li 1/ > ls.prev
19
20 sleepscip-shell system . . sleep. 1s
21
22 cpscip-shell system . . cp. -al 1/ 2
23
24 echoscip-shell system . . echo. " 2/ before"
25 lsscip-shell system . . ls. -li 2/
26 echoscip-shell system . . 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 echoscip-shell system . . echo. " 2/ after"
28 lsscip-shell system . . ls. -li 2/
29
30 rmscip-shell system . . rm. -rf 2/
31
32 lsscip-shell system . . ls. -li 1/ > ls.after
33
34
35 echoscip-shell system . . echo. " 1/ differences; should not exist"
36 diffscip-shell system . . diff. -u ls.prev ls.after
37
38 rmscip-shell system . . rm. -rf ${TESTDIR}