Add test scripts

This commit is contained in:
Akbar Rahman 2019-01-18 17:52:44 +00:00
parent ffaf0b0dc5
commit 5e56ea491e
Signed by: alvierahman90
GPG Key ID: 20609519444A1269
9 changed files with 59 additions and 0 deletions

5
macros Normal file
View File

@ -0,0 +1,5 @@
.hc hydrocarbon
.h hydrogen
.c carbon
.o oxygen
:wink: 😉

4
test.sh Executable file
View File

@ -0,0 +1,4 @@
#/usr/bin/env sh
./pymacro -sm tests/test_macros_plural -m tests/test_macros_biology tests/test_input tests/test_actual_output
diff tests/test_actual_output tests/test_expected_output

5
tests/macros Normal file
View File

@ -0,0 +1,5 @@
.hc hydrocarbon
.h hydrogen
.c carbon
.o oxygen
:wink: 😉

12
tests/test_actual_output Normal file
View File

@ -0,0 +1,12 @@
Hydrocarbons are composed of exclusively hydrogen and carbon.
Chlorophyll is the site of photosynthesis.
😉
1 hydrocarbon 2 hydrocarbons
1 dress 2 dresses
1 story 2 stories
1 hero 2 heroes
1 leaf 2 leaves
1 man 2 men

View File

@ -0,0 +1,12 @@
Hydrocarbons are composed of exclusively hydrogen and carbon.
Chlorophyll is the site of photosynthesis.
😉
1 hydrocarbon 2 hydrocarbons
1 dress 2 dresses
1 story 2 stories
1 hero 2 heroes
1 leaf 2 leaves
1 man 2 men

12
tests/test_input Normal file
View File

@ -0,0 +1,12 @@
.Hcs are composed of exclusively .h and .c.
.Chl is the site of .ps.
:wink:
1 .hc 2 .hcs
1 .d 2 .ds
1 .s 2 .ss
1 .he 2 .hes
1 .l 2 .ls
1 .m 2 .ms

View File

@ -0,0 +1,2 @@
.chl chlorophyll
.ps photosynthesis

View File

@ -0,0 +1 @@
.l louse lice

6
tests/test_macros_plural Normal file
View File

@ -0,0 +1,6 @@
.hc hydrocarbon
.d dress
.s story
.he hero
.l leaf
.m man men