~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to test/test_framework/filesum_text.xml

  • Committer: dilshan_a
  • Date: 2008-01-25 00:20:21 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:295
Added a filesum problem.
Updated paths in test.py and test.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<problem name = "Sum numbers in a file">
 
2
    <solution>
 
3
<![CDATA[
 
4
print sum(map(int,file(raw_input()).readlines()))
 
5
]]>
 
6
    </solution>
 
7
    <!-- Alternatively, <solution src="all_input_test_soln.py" /> -->
 
8
    <case name="Normal case">
 
9
        <!-- Specify input -->
 
10
        <stdin>input.txt</stdin>
 
11
        <file name='input.txt'><![CDATA[
 
12
1
 
13
2
 
14
3
 
15
]]>
 
16
        </file>
 
17
        <function desc="Match" default="match"/>
 
18
    </case>
 
19
    <case name="Negative numbers">
 
20
        <!-- Specify input -->
 
21
        <stdin>input.txt</stdin>
 
22
        <file name='input.txt'><![CDATA[
 
23
1
 
24
2
 
25
-5
 
26
]]>
 
27
        </file>
 
28
        <function desc="Match" default="match"/>
 
29
    </case>
 
30
    <case name="No input">
 
31
        <!-- Specify input -->
 
32
        <stdin>input.txt</stdin>
 
33
        <file name='input.txt'><![CDATA[
 
34
]]>
 
35
        </file>
 
36
        <function desc="Match" default="match"/>
 
37
    </case>
 
38
</problem>