Skip to content

Commit

Permalink
online-judge-tools#438: test rstrip.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukatani committed Oct 1, 2019
1 parent 0d2a9cc commit 5763be2
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/command_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ def test_call_test_simple(self):
'path': 'test/sample-2.out',
'data': 'foo\n'
},
{
'path': 'test/sample-3.in',
'data': 'foobar \n'
},
{
'path': 'test/sample-3.out',
'data': 'foobar\n'
},
],
expected=[{
'status': 'AC',
Expand All @@ -65,6 +73,40 @@ def test_call_test_simple(self):
},
'output': 'bar\n',
'exitcode': 0,
}, {
'status': 'AC',
'testcase': {
'name': 'sample-3',
'input': '%s/test/sample-3.in',
'output': '%s/test/sample-3.out',
},
'output': 'foobar \n',
'exitcode': 0,
}],
)

def test_call_test_norstrip(self):
self.snippet_call_test(
args=['-c', cat(), '--no-rstrip'],
files=[
{
'path': 'test/sample-1.in',
'data': 'foo \n'
},
{
'path': 'test/sample-1.out',
'data': 'foo\n'
},
],
expected=[{
'status': 'WA',
'testcase': {
'name': 'sample-1',
'input': '%s/test/sample-1.in',
'output': '%s/test/sample-1.out',
},
'output': 'foo \n',
'exitcode': 0,
}],
)

Expand Down

0 comments on commit 5763be2

Please sign in to comment.