Skip to content

Commit

Permalink
Updated Text Ui Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nubnubyas committed Sep 21, 2023
1 parent d6c0d96 commit 2c9a19c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
16 changes: 9 additions & 7 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Now you have 1 tasks in the list.
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[D][ ] return book (by: June 6th)
[D][ ] return book (by: 06-06-2023 19:00)
Now you have 2 tasks in the list.
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[E][ ] project meeting (from: Aug 6th 2pm to: 4pm)
[E][ ] project meeting (from: 06-06-2023 19:00 to: 06-06-2023 21:00)
Now you have 3 tasks in the list.
____________________________________________________________
____________________________________________________________
Expand All @@ -33,9 +33,10 @@ ____________________________________________________________
____________________________________________________________
Here are the tasks in your list:
1.[T][X] read book
2.[D][ ] return book (by: June 6th)
3.[E][ ] project meeting (from: Aug 6th 2pm to: 4pm)
2.[D][ ] return book (by: 06-06-2023 19:00)
3.[E][ ] project meeting (from: 06-06-2023 19:00 to: 06-06-2023 21:00)
4.[T][X] join sports club

____________________________________________________________
____________________________________________________________
Got it. I've added this task:
Expand All @@ -44,15 +45,16 @@ Now you have 5 tasks in the list.
____________________________________________________________
____________________________________________________________
Got it. I've added this task:
[D][ ] return book (by: Sunday)
[D][ ] return book (by: 06-06-2023 19:00)
Now you have 6 tasks in the list.
____________________________________________________________
____________________________________________________________
Nice! I've marked this task as done:
[D][X] return book (by: June 6th)
[D][X] return book (by: 06-06-2023 19:00)
____________________________________________________________
____________________________________________________________
Argument Error: No enum constant Monday.Command.BLAH
Sorry, I do not understand what that means.
Please provide a valid input/command. e.g todo read book
____________________________________________________________
____________________________________________________________
Bye. Hope to see you again soon!
Expand Down
Binary file added text-ui-test/data/duke.txt
Binary file not shown.
6 changes: 3 additions & 3 deletions text-ui-test/input.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
todo read book
deadline return book /by June 6th
event project meeting /from Aug 6th 2pm /to 4pm
deadline return book /by 2023-06-06 19:00
event project meeting /from 2023-06-06 19:00 /to 2023-06-06 21:00
todo join sports club
mark 1
mark 4
list
todo borrow book
deadline return book /by Sunday
deadline return book /by 2023-06-06 19:00
mark 2
blah
bye
4 changes: 2 additions & 2 deletions text-ui-test/runtest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ REM delete output from previous run
if exist ACTUAL.TXT del ACTUAL.TXT

REM compile the code into the bin folder
javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\*.java
javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\monday\Monday.java
IF ERRORLEVEL 1 (
echo ********** BUILD FAILURE **********
exit /b 1
)
REM no error here, errorlevel == 0

REM run the program, feed commands from input.txt file and redirect the output to the ACTUAL.TXT
java -classpath ..\bin Monday < input.txt > ACTUAL.TXT
java -classpath ..\bin monday.Monday < input.txt > ACTUAL.TXT

REM compare the output to the expected output
FC ACTUAL.TXT EXPECTED.TXT

0 comments on commit 2c9a19c

Please sign in to comment.