Implement the magic-cookie check and its test.
This commit is contained in:
parent
d16822a583
commit
58cf204eba
4 changed files with 34 additions and 1 deletions
22
tests/badmagic.chk
Normal file
22
tests/badmagic.chk
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
Welcome to Adventure!! Would you like instructions?
|
||||
|
||||
> n
|
||||
|
||||
You are standing at the end of a road before a small brick building.
|
||||
Around you is a forest. A small stream flows out of the building and
|
||||
down a gully.
|
||||
|
||||
> resume
|
||||
Can't open file y, try again.
|
||||
|
||||
Oops, that does not look like a valid save file.
|
||||
|
||||
You're in front of building.
|
||||
|
||||
>
|
||||
You scored 32 out of a possible 430, using 1 turn.
|
||||
|
||||
You are obviously a rank amateur. Better luck next time.
|
||||
|
||||
To achieve the next higher rating, you need 14 more points.
|
8
tests/badmagic.log
Normal file
8
tests/badmagic.log
Normal file
|
@ -0,0 +1,8 @@
|
|||
## Resume from filename withoy the right magic at the front
|
||||
# SPDX-FileCopyrightText: Eric S. Raymond <esr@thyrsus.com>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#NOCOMPARE advent430 doesn't have this test
|
||||
n
|
||||
resume
|
||||
y
|
||||
../main.o
|
Loading…
Add table
Add a link
Reference in a new issue