"Fossies" - the Fresh Open Source Software Archive 
Member "c_count-7.20/testing/run_test.dcl" (21 May 1995, 2083 Bytes) of package /linux/privat/c_count-7.20.tgz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 $! $Id: run_test.dcl,v 7.2 1995/05/21 23:19:04 tom Exp $
2 $ verify = F$VERIFY(0)
3 $ set := set
4 $ set symbol/scope=(nolocal,noglobal)
5 $ path = F$ENVIRONMENT("procedure")
6 $ path = F$EXTRACT(0,F$LOCATE("]",path)+1,path)
7 $ prog = "$ ''F$EXTRACT(0,F$LENGTH(path)-1,path)'.-]C_COUNT"
8 $ temp = "sys$scratch:C_COUNT.tmp"
9 $ call remove 'temp
10 $
11 $ type sys$input
12 **
13 ** Case 1: Count lines in test-files (which have both unbalanced quotes and
14 ** "illegal" characters:
15 $ eod
16 $
17 $ prog -o 'temp test1.c test2.c
18 $ call display normal
19 $
20 $ type sys$input
21 **
22 ** Case 2: Suppressing unbalanced-quote:
23 $ eod
24 $
25 $ prog -o 'temp -q"LEFT" test1.c test2.c
26 $ call display quotes
27 $
28 $ type sys$input
29 **
30 ** Case 3: Counting by names given in standard-input:
31 $ eod
32 $
33 $ prog -o 'temp
34 test1.c
35 test2.c
36 $ eod
37 $ call display list
38 $
39 $ type sys$input
40 **
41 ** Case 4: Counting bulk text piped in standard-input:
42 $ eod
43 $
44 $ pipe = "sys$scratch:C_COUNT.tst"
45 $ call remove 'pipe
46 $ copy test1.c 'pipe
47 $ append test2.c 'pipe;
48 $
49 $ define/user_mode sys$input 'pipe
50 $ prog -o 'temp -v "-"
51 $! note the quoted '-' so that DCL didn't think it was continuation
52 $ call display cat
53 $
54 $ call remove 'pipe
55 $
56 $ type sys$input
57 **
58 ** Case 5: Counting history-comments
59 $ eod
60 $ prog -o 'temp test3.c
61 $ call display history
62 $
63 $ type sys$input
64 **
65 ** Case 6: Display as a spreadsheet
66 $ eod
67 $ prog -o 'temp -t -q"LEFT" test1.c test2.c test3.c
68 $ call display table
69 $
70 $ type sys$input
71 **
72 ** Case 7: Display as a spreadsheet (per-file)
73 $ eod
74 $ prog -o 'temp -pt -q"LEFT" test1.c test2.c test3.c
75 $ call display table_p
76 $
77 $ verify = F$VERIFY(0)
78 $ exit
79 $
80 $ display: subroutine
81 $ test = "''path'''p1'.ref"
82 $ list = "sys$scratch:C_COUNT.dif"
83 $ diff/output='list 'temp 'test
84 $ if $severity .ne. 1
85 $ then
86 $ write sys$output "** failed:"
87 $ type 'list
88 $ else
89 $ write sys$output "** (ok)"
90 $ endif
91 $ call remove 'temp
92 $ call remove 'list
93 $ endsubroutine
94 $
95 $ remove: subroutine
96 $ set noon
97 $ set message/noident/notext/nosever/nofacil
98 $ set file/protection=(o:rwed) 'p1;*
99 $ delete 'p1;*
100 $ set message/ident/text/sever/facil
101 $ set on
102 $ return
103 $ endsubroutine