File: body.sh

package info (click to toggle)
cssc 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, 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 (58 lines) | stat: -rw-r--r-- 1,291 bytes parent folder | download | duplicates (4)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#! /bin/sh

# body.sh:  Testing for :GB: keyword of prs.

# Import common functions & definitions.
. ../common/test-common

remove s.1 p.1 z.1 1 command.log DESC s.foo p.foo z.foo 

# Create file
echo "hello" > DESC
docommand b1 "${admin} -n -iDESC s.1" 0 "" IGNORE
remove DESC

# get -p should just emit the body.
docommand b2 "${get} -p s.1" 0 "hello
" IGNORE

# get -d :GB: should emit the body followed by a newline
docommand b3 "${vg_prs} -d:GB: s.1" 0 "hello

" IGNORE


# Also, keyword expansion should occur too. 
remove s.1 p.1 z.1 1 command.log DESC

# Create file again
echo "%Z%" > DESC
docommand b4 "${admin} -n -iDESC s.1" 0 "" IGNORE
remove DESC


# get -p should just emit the body, with kw expansion
docommand b5 "${get} -p s.1" 0 "@(#)
" IGNORE

# get -d :GB: should emit the body followed by a newline with kw expansion
docommand b6 "${vg_prs} -d:GB: s.1" 0 "@(#)

" IGNORE

# get -p -k should just emit the body, without kw expansion
# we have to make this check to ensure that prs was really
# going keyword expansion
docommand b7 "${get} -p -k s.1" 0 "%Z%
" IGNORE


## Testing for :BD:
docommand b7 "cp sample_foo s.foo" 0 IGNORE IGNORE

do_output b8 "${vg_prs} -d:BD: s.foo" 0 s_foo_bd_output.txt IGNORE



remove s.1 p.1 z.1 1 command.log s.foo p.foo z.foo 
success