Implemented Funge-98 IO procedures
This commit is contained in:
parent
7c24db334e
commit
9e29dd5678
2 changed files with 65 additions and 0 deletions
25
tests/defaultIO.nim
Normal file
25
tests/defaultIO.nim
Normal file
|
@ -0,0 +1,25 @@
|
|||
discard """
|
||||
input: "ab1234cd12f"
|
||||
output: '''
|
||||
[Suite] defaultIO
|
||||
gh789
|
||||
'''
|
||||
"""
|
||||
|
||||
import unittest
|
||||
|
||||
include ../src/defaultIO
|
||||
|
||||
suite "defaultIO":
|
||||
test "defaultCharacterInput":
|
||||
check defaultCharacterInput() == 'a'.int
|
||||
check defaultCharacterInput() == 'b'.int
|
||||
check defaultCharacterInput() == '1'.int
|
||||
test "defaultDecimalInput":
|
||||
check defaultDecimalInput() == 234
|
||||
check defaultCharacterInput() == 'c'.int
|
||||
test "defaultCharacterOutput":
|
||||
defaultCharacterOutput('g'.int)
|
||||
defaultCharacterOutput('h'.int)
|
||||
test "defaultDecimalOutput":
|
||||
defaultDecimalOutput(789)
|
Reference in a new issue