File: cutoff.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 (29 lines) | stat: -rw-r--r-- 945 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
#! /bin/sh

# cutoff.sh:  Tests for prs -e and prs -l (with both -c and -r).

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

s="../year-2000/s.y2k.txt"
cleanup () {
    remove command.log
}
cleanup

# First, basic tests with a cutoff which does not co-incide precisely
# with the date of an existing delta.
docommand co1 "${prs} -e -c70 -d:I: $s" 0 "1.1\n" IGNORE
docommand co2 "${prs} -l -c70 -d:I: $s" 0 "1.5\n1.4\n1.3\n1.2\n" IGNORE

# Now, choose a data which does coincide.  The delta whose time matches
# should always be printed (in this case, 1.2).
docommand co3 "${prs} -e -c991231235959 -d:I: $s" 0 "1.2\n1.1\n" IGNORE
docommand co4 "${prs} -l -c991231235959 -d:I: $s" 0 "1.5\n1.4\n1.3\n1.2\n" IGNORE


# These tests are fundamentally the same but with -r instead of -c.
docommand co5 "${prs} -e -r1.2 -d:I: $s" 0 "1.2\n1.1\n" IGNORE
docommand co6 "${prs} -l -r1.2 -d:I: $s" 0 "1.5\n1.4\n1.3\n1.2\n" IGNORE

cleanup