aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulien Dessaux2021-10-04 23:47:22 +0200
committerJulien Dessaux2021-10-04 23:47:22 +0200
commit9e29dd5678d463426d224ad50014a37b04ff34cc (patch)
tree114dfe6e65f720b00cb4039bccf1ca8288e06779 /tests
parentCosmetics (diff)
downloadnimfunge98-9e29dd5678d463426d224ad50014a37b04ff34cc.tar.gz
nimfunge98-9e29dd5678d463426d224ad50014a37b04ff34cc.tar.bz2
nimfunge98-9e29dd5678d463426d224ad50014a37b04ff34cc.zip
Implemented Funge-98 IO procedures
Diffstat (limited to '')
-rw-r--r--tests/defaultIO.nim25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/defaultIO.nim b/tests/defaultIO.nim
new file mode 100644
index 0000000..2de2330
--- /dev/null
+++ b/tests/defaultIO.nim
@@ -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)