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

« back to all changes in this revision

Viewing changes to subjects/sample/all_input.xml

  • Committer: mattgiuca
  • Date: 2008-01-31 01:44:30 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:345
Global CSS change: ivlebody no longer has 1em of padding (it has none).
This is because most apps were disabling it (and it had to change anyway for
other reasons -- see below).

Hence, all apps which WERE disabling the padding have had that removed, and
just work by default. (console, browser, tutorial)
All apps which WEREN'T disabling the padding (very few) now have to manually
include an extra div. This has been done on all such apps, and has been
heavily documented (both in the CSS file and doc/app_howto). (help, dummy,
debuginfo).

media/common/ivle.css: 
    The real change here (which isn't yet being used) is that ivlebody is now
    positioned absolutely and takes up all the space on the canvas. This is
    to be used for full-page layouts in console and browser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<problem name = "Test all IO">
 
2
    <desc>Write a program which does the following:
 
3
      <ol>
 
4
        <li>Gets the value of a variable "foo" and prints it to stdout.</li>
 
5
        <li>Gets the contents of a file "input.txt" and prints it to stdout.
 
6
        </li>
 
7
        <li>Gets the contents of stdin and writes it to a file "output.txt".
 
8
        </li>
 
9
      </ol>
 
10
    </desc>
 
11
    <include>
 
12
        <!-- Here you can place any Python functions to use for normalisation.
 
13
             Note: "id" will be in our standard test functions lib.
 
14
          -->
 
15
<![CDATA[
 
16
def id(x):
 
17
    return x
 
18
]]>
 
19
    </include>
 
20
    <solution>
 
21
<![CDATA[
 
22
# Sample solution, used to generate test output
 
23
input1 = raw_input()
 
24
input2 = file('input.txt').read()
 
25
input3 = foo
 
26
 
 
27
print input3
 
28
 
 
29
print input2
 
30
 
 
31
f = file('output.txt','w')
 
32
f.write(input1)
 
33
f.close()
 
34
]]>
 
35
    </solution>
 
36
    <!-- Alternatively, <solution src="all_input_test_soln.py" /> -->
 
37
    <case name="All Tests">
 
38
        <!-- Specify input -->
 
39
        <stdin>This is Standard Input</stdin>
 
40
        <file name='input.txt'>
 
41
            File Input
 
42
        </file>
 
43
        <var name="foo" value="'Variable Input'" />
 
44
 
 
45
        <!-- Functions test varying levels of compliance with the spec -->
 
46
        <!-- 'default="match"' means exactly match any unlisted files.
 
47
              (The default behaviour)
 
48
             'default="ignore"' means ignore any unlisted files.
 
49
          -->
 
50
        <!-- Match stdout case insensitive, output.txt match exactly,
 
51
             and ignore other files. -->
 
52
        <function desc="Match case insensitive and ignore other files"
 
53
            default="ignore">
 
54
            <stdout>str.lower</stdout>
 
55
            <!-- 'type="norm"' treats the function as a normalisation
 
56
                 function (the default behaviour).
 
57
                 'type="check"' treats it as a 2-argument check. -->
 
58
            <file name="output.txt" type="norm">str.lower</file>
 
59
        </function>
 
60
        <function desc="Match expected files" default="ignore">
 
61
                <stdout/>
 
62
                <file name="output.txt"/>
 
63
        </function>
 
64
        <!-- Match all files exactly, even those not listed. -->
 
65
        <function desc="Match output, no unexpected files allowed" />
 
66
    </case>
 
67
</problem>