diff --git a/testcases/configs/dungeon_config_38.txt b/testcases/configs/dungeon_config_38.txt new file mode 100644 index 0000000000000000000000000000000000000000..58da5b51db7409bb41044a19034e6ecaf0218f31 --- /dev/null +++ b/testcases/configs/dungeon_config_38.txt @@ -0,0 +1,2 @@ +DUNGEON +1:9,4;D:1,8:0;L:3,2:1; diff --git a/testcases/test.toml b/testcases/test.toml index c1954a2af049e0b89103682d5591e94aa43d145d..e45fb871d08f753aa30504bb033955d4434d6585 100644 --- a/testcases/test.toml +++ b/testcases/test.toml @@ -420,6 +420,17 @@ argv = ["configs/dungeon_config_37.txt", "configs/story_config.txt"] protected = false env_vars = ['RAND_SEED=1234'] +[[testcases]] +name = "Don't print room after everyone's dead" +description = "" +type = "OrdIO" +io_file = "tests/38/io.txt" +io_prompt = "s*>\\s*$" +exp_exit_code = 0 +argv = ["configs/dungeon_config_38.txt", "configs/story_config.txt"] +protected = false +env_vars = ['RAND_SEED=1234'] + [[testcases]] name = "Custom TC 40 - Input errors" description = "Tries combinations of wrong inputs" diff --git a/testcases/tests/38/input.txt b/testcases/tests/38/input.txt new file mode 100644 index 0000000000000000000000000000000000000000..1c1133bce2649927d19df4b9192541ab6ed7eb6a --- /dev/null +++ b/testcases/tests/38/input.txt @@ -0,0 +1,6 @@ +1 +w +w +move 2,8 +move w 2,8 +quit diff --git a/testcases/tests/38/io.txt b/testcases/tests/38/io.txt new file mode 100644 index 0000000000000000000000000000000000000000..2523fd9c326a71eacfc5b338bcd0a55fa5e3c0b2 --- /dev/null +++ b/testcases/tests/38/io.txt @@ -0,0 +1,84 @@ +> +> ** Welcome to the exciting world of Dungeons & Classes! +> +> How many players want to join the adventure? (1 to 3) +? > +< 1 +> +> Player 1 what do you wish to be called? (max length 10 characters) +? > +< w +> w, please choose a player type: +> [W] Wizard 0/1 +> [B] Barbarian 0/1 +> [R] Rogue 0/1 +? > +< w +> +> -- Players -------------------------------------- +> Player 1: Wizard [W] "w" +> +> ** You have entered the dungeon of the evil Lich! +> ** Help the anxious souls of the nearby village by freeing +> ** them from the monsters that haunt it! +> +> ** We have reached the end of the dungeon! +> ** Kill the Lich and you should all be celebrated as heroes of the dungeon. +> +> +> -- ROOM 1 (0/1 completed) -------------------- +> +> 1 2 3 4 5 6 7 8 9 +> +---+---+---+---+---+---+---+---+---+ +> 1 | | | | | | | |#D0| W | +> +---+---+---+---+---+---+---+---+---+ +> 2 | | | | | | | | | | +> +---+---+---+---+---+---+---+---+---+ +> 3 | | L1| | | | | | | | +> +---+---+---+---+---+---+---+---+---+ +> 4 | | | | | | | | | | +> +---+---+---+---+---+---+---+---+---+ +> L1: 50/50 +> +> ** What do you want to do? +? > +< move 2,8 +> !! Invalid AMOUNT OF PARAMETERS. +? > +< move w 2,8 +> Wizard [W] "w" moved to (2,8). +> +> -- ROOM 1 (0/1 completed) -------------------- +> +> 1 2 3 4 5 6 7 8 9 +> +---+---+---+---+---+---+---+---+---+ +> 1 | | | | | | | |#D0| | +> +---+---+---+---+---+---+---+---+---+ +> 2 | | | | | | | | W | | +> +---+---+---+---+---+---+---+---+---+ +> 3 | | L1| | | | | | | | +> +---+---+---+---+---+---+---+---+---+ +> 4 | | | | | | | | | | +> +---+---+---+---+---+---+---+---+---+ +> L1: 50/50 +> +> Lich 1 [L1] used "Quarterstaff of Fire" on (2,8) affecting (1,8), (2,7), (2,8), (2,9), (3,8). +> [Dice Roll] 3 d6 resulting in a total value of 12. +> +> w loses 10 health (12 * 100 % - 0). +> w was defeated. +> +> ** Unfortunately this adventure has come to a tragic end! +> ** These brave adventurers did not make it out alive. +> +> -- Players -------------------------------------- +> Wizard [W] "w", rest in peace. +> +> -- Statistics ----------------------------------- +> 0 rooms completed +> 1 performed actions +> +> ** Enter the file path of a writable file or +> ** a path for a new file (including the file format e.g. `.txt`). +? > +< quit