From 588254d02e73e9998e717cc1f95218a2beeb8bf5 Mon Sep 17 00:00:00 2001 From: LouisLouis19 Date: Thu, 30 Sep 2021 02:33:37 +0800 Subject: [PATCH] Update test cases in text-ui-test --- text-ui-test/EXPECTED.TXT | 115 ++++++++++++++++++++++++++------ text-ui-test/input.txt | 24 +++++-- text-ui-test/savedData/duke.txt | 2 - 3 files changed, 113 insertions(+), 28 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index d087552a0..3ec0bb855 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -10,27 +10,45 @@ ____________________________________________________________ What can I do for you? ____________________________________________________________ +____________________________________________________________ +Something went wrong: Text 'today' could not be parsed at index 0 +____________________________________________________________ + +____________________________________________________________ +Something went wrong: Text '7' could not be parsed at index 0 +____________________________________________________________ + +____________________________________________________________ + No Tasks here yet. Go include some tasks! +____________________________________________________________ + ____________________________________________________________ Got it. I've added this task: - [D] [ ] watch lecture (by: today) + [T] [ ] buy bread Now you have 1 tasks in the list. ____________________________________________________________ ____________________________________________________________ Got it. I've added this task: - [E] [ ] movie (at: 7) + [D] [ ] group project (by: Oct 10 2021 18:00PM) Now you have 2 tasks in the list. ____________________________________________________________ +____________________________________________________________ + Nice! I've marked this task as done: + [T] [X] buy bread +____________________________________________________________ + ____________________________________________________________ Here are the tasks in your list: - 1. [D] [ ] watch lecture (by: today) - 2. [E] [ ] movie (at: 7) + 1. [T] [X] buy bread + 2. [D] [ ] group project (by: Oct 10 2021 18:00PM) ____________________________________________________________ ____________________________________________________________ - Nice! I've marked this task as done: - [D] [X] watch lecture (by: today) + Got it. I've added this task: + [E] [ ] sports day (at: Feb 12 2022 09:00AM) + Now you have 3 tasks in the list. ____________________________________________________________ ____________________________________________________________ @@ -39,43 +57,98 @@ To input a done command, type "done (task index)"! ____________________________________________________________ ____________________________________________________________ -Your event command is invalid! -To input a event command, type "event (description) /at (when)"! +Something went wrong: Text 'invalid' could not be parsed at index 0 ____________________________________________________________ ____________________________________________________________ Your event command is invalid! -To input a event command, type "event (description) /at (when)"! +To input a event command, type "event (description) /at (yyyy-MM-dd HH:mm)"! ____________________________________________________________ ____________________________________________________________ Your deadline command is invalid! -To input a valid deadline command, type "deadline (description) /by (deadline)"! +To input a valid deadline command, type "deadline (description) /by (yyyy-MM-dd HH:mm)"! ____________________________________________________________ ____________________________________________________________ - Got it. I've added this task: - [T] [ ] buy bread - Now you have 3 tasks in the list. + Here are the tasks in your list: + 1. [T] [X] buy bread + 2. [D] [ ] group project (by: Oct 10 2021 18:00PM) + 3. [E] [ ] sports day (at: Feb 12 2022 09:00AM) +____________________________________________________________ + +____________________________________________________________ + Nice! I've marked this task as done: + [E] [X] sports day (at: Feb 12 2022 09:00AM) ____________________________________________________________ ____________________________________________________________ Here are the tasks in your list: - 1. [D] [X] watch lecture (by: today) - 2. [E] [ ] movie (at: 7) - 3. [T] [ ] buy bread + 1. [T] [X] buy bread + 2. [D] [ ] group project (by: Oct 10 2021 18:00PM) + 3. [E] [X] sports day (at: Feb 12 2022 09:00AM) ____________________________________________________________ ____________________________________________________________ - Nice! I've marked this task as done: - [T] [X] buy bread +Here are the matching tasks in your list to "sports" + 1. [E] [X] sports day (at: Feb 12 2022 09:00AM) +____________________________________________________________ + +____________________________________________________________ +There are no matching tasks in your list! +____________________________________________________________ + +____________________________________________________________ + Noted! I've removed this task: + [D] [ ] group project (by: Oct 10 2021 18:00PM) + Now you have 2 tasks in the list. +____________________________________________________________ + +____________________________________________________________ + Here are the tasks in your list: + 1. [T] [X] buy bread + 2. [E] [X] sports day (at: Feb 12 2022 09:00AM) +____________________________________________________________ + +____________________________________________________________ + Noted! I've removed this task: + [E] [X] sports day (at: Feb 12 2022 09:00AM) + Now you have 1 tasks in the list. +____________________________________________________________ + +____________________________________________________________ +Your delete command is invalid! +To input a delete command, type "delete (task index)"! +____________________________________________________________ + +____________________________________________________________ +Your delete command is invalid! +To input a delete command, type "delete (task index)"! ____________________________________________________________ ____________________________________________________________ Here are the tasks in your list: - 1. [D] [X] watch lecture (by: today) - 2. [E] [ ] movie (at: 7) - 3. [T] [X] buy bread + 1. [T] [X] buy bread +____________________________________________________________ + +____________________________________________________________ + Noted! I've removed this task: + [T] [X] buy bread + Now you have 0 tasks in the list. +____________________________________________________________ + +____________________________________________________________ + No Tasks here yet. Go include some tasks! +____________________________________________________________ + +____________________________________________________________ + Type list to display your list of todos. + Type todo {description} to add a task into your list. + Type event {description} /at {yyyy-MM-dd HH:mm} to add an event into your list. + Type deadline {description} /by {yyyy-MM-dd HH:mm} to add a deadline into your list. + Type delete {index} to delete a task from your list of todos. + Type done {index} to mark a task as done in your list of todos. + Type bye to exit Duke. ____________________________________________________________ ____________________________________________________________ diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 6d40efc2c..377889bd2 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -1,13 +1,27 @@ deadline watch lecture /by today event movie /at 7 list -done 1 -done 3 -event -event soccer / at 4 Sep -deadline eat dinner / by tonight todo buy bread +deadline group project /by 2021-10-10 18:00 +done 1 +list +event sports day /at 2022-02-12 09:00 +done 5 +deadline no description /by invalid +event none / at invalid syntax +deadline none / by invalid syntax list done 3 list +find sports +find life +delete 2 +list +delete 2 +delete 2 +delete +list +delete 1 +list +help bye \ No newline at end of file diff --git a/text-ui-test/savedData/duke.txt b/text-ui-test/savedData/duke.txt index 29715b100..e69de29bb 100644 --- a/text-ui-test/savedData/duke.txt +++ b/text-ui-test/savedData/duke.txt @@ -1,2 +0,0 @@ -T | 1 | buy bread | -T | 0 | buy bread |