File: admin.sh

package info (click to toggle)
cssc 0.14alpha.pl0-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,796 kB
  • ctags: 1,404
  • sloc: cpp: 12,927; sh: 3,617; ansic: 3,000; perl: 342; makefile: 334; awk: 11
file content (37 lines) | stat: -rw-r--r-- 853 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
#! /bin/sh
# admin.sh:  The creation of very large (>99999 lines) SCCS files.

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

g=bigfile.txt
s=s.$g
z=z.$g
x=x.$g
p=p.$g

lines=100002

remove command.log log log.stdout log.stderr $g $s $z $x $p

( ../../testutils/yes '%C%' | head -${lines} > $g )  || miscarry Cannot create large input file.

docommand A1 "${admin} -i${g} ${s}" 0 "" ""
mv ${g} old.${g} || miscarry "Rename failed"

# Make sure we can retrieve the file.
docommand A2 "${get} -k $s" 0 "1.1\n100002 lines\n" ""
diff old.${g} ${g} || fail A2 "cannot correctly retrieve stored file"
remove old.${g} ${g}
docommand A3 "${get} $s" 0 "1.1\n100002 lines\n" ""

# Make sure the number of lines is correct.
docommand A4 "${prs} -d:Li: $s" 0 "99999\n" ""


remove command.log log log.stdout log.stderr $g $s $z $x $p
success