File: test-game

package info (click to toggle)
cataclysm-dda 0.H-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 710,808 kB
  • sloc: cpp: 524,019; python: 11,580; sh: 1,228; makefile: 1,169; xml: 507; javascript: 150; sql: 56; exp: 41; perl: 37
file content (79 lines) | stat: -rwxr-xr-x 1,202 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/expect -f

set timeout 120

# we need to have at least 39 lines
# (the halloween holiday screen needs that height)
set stty_init "rows 39 cols 80"

# make sure no old state is there
system "rm -rf ~/.local/share/cataclysm-dda/"

# need to create directories until upstream bug #26660 is fixed
file mkdir ~/.config
file mkdir ~/.local/share

set env(LANG) "en_US.UTF-8"
set env(TERM) "linux"

spawn cataclysm

expect_before {
	timeout { puts "timeout"; exit 1 }
}

# title screen
expect "ew Game*"

# show MOTD
send -- "M"

# start a new game
send -- "N"
expect "Play Now!*"
send -- "D"

# loading screens
expect "Loading files"
expect "Finalizing"
expect "Please wait as we build your world"

# now ingame
expect "You have survived*"

# save game
send -- "S"
expect "Save and quit?*"
send -- "Y"

# title screen
expect "ew Game*"
send -- "M"

# load game
send -- "a"
expect "?*"
#expect "1*"
send -- "\r"
expect "q*"
send -- "\r"

# loading screens
expect "Loading files"
expect "Finalizing"
expect "You have survived*"

# save game
send -- "S"
expect "Save and quit?*"
send -- "Y"

# back to title screen
expect "ew Game*"

# quit
send -- "Q"
expect "Really quit?*"
send -- "Y"
expect eof