-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample2.test
More file actions
executable file
·59 lines (42 loc) · 1.4 KB
/
example2.test
File metadata and controls
executable file
·59 lines (42 loc) · 1.4 KB
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
59
#!./pvcheck
#######################################################################
# EXAMPLE WITH MULTIPLE TEST CASES
#######################################################################
# Each test is introduced by the special section [.TEST]. Usually,
# each test has different inputs and outputs. Outputs are defined by
# ordinary sections. The input can be specified:
#
# - with the special section [.INPUT] that allows to specify text to
# be sent to the program via its standard input;
#
# - with the special section [.ARGS] that allow to specify additional
# arguments to be passed with the command line (one extra argument
# per line).
# Common parts among all the test cases (for instance options in the
# [.SECTIONS] special section) can be specified before the first
# [.TEST] section. They will be prepended to all the tests.
# In this example the program is supposed to read an integer from the
# standard input, anf to write its factorial.
############################################################
[.TEST]
Factorial of zero
# The first line of the section identify the test
[.INPUT]
0
[FACTORIAL]
1
############################################################
[.TEST]
Factorial of one
[.INPUT]
1
[FACTORIAL]
1
############################################################
[.TEST]
Factorial of five
[.INPUT]
5
[FACTORIAL]
120
############################################################