File: executable.sh

package info (click to toggle)
cssc 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 11,368 kB
  • sloc: cpp: 39,446; ansic: 17,403; sh: 11,328; python: 3,923; makefile: 1,929; perl: 342; awk: 15; sed: 15
file content (44 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
. ../common/test-common
. ../common/real-thing

g=foo
s=s.$g
p=p.$g
z=z.$g

cleanup() {
    cmd="rm -f ${g} ${s} ${p} ${z}"
    echo "${cmd}" >> command.log
    $cmd
}
cleanup

# We use -i/dev/null below in order not to spuriously make the test
# suite fail on Dynix.
docommand          x00 "${admin} -i/dev/null -n ${s}" 0 IGNORE IGNORE
# Get the file with the history file not executable; check that the
# gotten file is not executable.
docommand          x01 "${get} ${s}" 0 IGNORE IGNORE
# Make sure the gfile exists at all first.
docommand          x02 "test -f ${g}" 0 "" ""
docommand          x03 "test -x ${g}" 1 "" ""

# Make the history file executable
docommand          x04 "chmod +x ${s}" 0 "" ""
docommand --silent x04-sanity "test -x ${s}" 0 "" ""

# Check that the gotten file is now executable.
rm -f "${g}"
docommand          x05 "${get} ${s}" 0 IGNORE IGNORE
# Make sure the gfile exists at all first.
docommand          x06 "test -f ${g}" 0 "" ""
docommand          x07 "test -x ${g}" 0 "" ""

# get -e should also result in an executable gotten file.
rm -f "${g}"
docommand          x08 "${get} -e ${s}" 0 IGNORE IGNORE
# Make sure the gfile exists at all first.
docommand          x09 "test -f ${g}" 0 "" ""
docommand          x10 "test -x ${g}" 0 "" ""

cleanup