1
<problem name = "Test all IO">
3
<!-- Here you can place any Python functions to use for normalisation.
4
Note: "id" will be in our standard test functions lib.
13
# Sample solution, used to generate test output
15
input2 = file('input.txt').read()
22
f = file('output.txt','w')
27
<!-- Alternatively, <solution src="all_input_test_soln.py" /> -->
29
<!-- Specify input -->
30
<stdin>This is Standard Input</stdin>
31
<file name='input.txt'>
34
<var name="foo" value="'Variable Input'" />
36
<!-- Functions test varying levels of compliance with the spec -->
37
<!-- 'default="match"' means exactly match any unlisted files.
38
(The default behaviour)
39
'default="ignore"' means ignore any unlisted files.
41
<!-- Match stdout case insensitive, output.txt match exactly,
42
and ignore other files. -->
43
<function desc="Match case insensitive and ignore other files"
45
<stdout>str.lower</stdout>
46
<!-- 'type="norm"' treats the function as a normalisation
47
function (the default behaviour).
48
'type="check"' treats it as a 2-argument check. -->
49
<file name="output.txt" type="norm">str.lower</file>
51
<function desc="Match expected files" default="ignore">
53
<file name="output.txt"/>
55
<!-- Match all files exactly, even those not listed. -->
56
<function desc="Match output, no unexpected files allowed" />