File: t-option.sh

package info (click to toggle)
cssc 1.0.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,612 kB
  • ctags: 1,424
  • sloc: cpp: 13,502; sh: 4,759; ansic: 2,971; perl: 342; makefile: 339; awk: 11
file content (39 lines) | stat: -rw-r--r-- 797 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
#! /bin/sh

# t-option.sh:  Testing for correct operation of admin -t.

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

expands_to () {
    # $1 -- label
    # $2 -- format
    # $3 -- expansion
docommand $1 "${prs} \"-d$2\" s.bar" 0 "$3"
}

remove [sxzp].bar x.bar.bak

# Create file with description.
echo "Descriptive Text" > DESC
docommand T1 "${admin} -n -tDESC s.bar" 0 "" ""
remove DESC

# Make sure the decription is there.
expands_to T2 ':FD:'   'Descriptive Text\n\n'


# Remove the description.
docommand T3 "${admin} -t s.bar" 0 "" ""

# Make sure the decription has been removed.
expands_to T4 ':FD:'   'none\n\n'
remove s.bar

# Empty -t option is incompatible with -n and -i.
docommand T5 "${admin} -n -t s.bar" 1 "" IGNORE


remove [sxzp].bar  x.bar.bak
success