Add fairland test to make check
This commit is contained in:
parent
4dd0720fc0
commit
ed8eead0ba
5 changed files with 6229 additions and 0 deletions
1
Make.mk
1
Make.mk
|
@ -256,6 +256,7 @@ $(checks): all
|
||||||
check-smoke:
|
check-smoke:
|
||||||
@echo "Warning: smoke test is immature and needs work." >&2
|
@echo "Warning: smoke test is immature and needs work." >&2
|
||||||
$(srcdir)/tests/files-test $(srcdir)
|
$(srcdir)/tests/files-test $(srcdir)
|
||||||
|
$(srcdir)/tests/fairland-test $(srcdir)
|
||||||
ifeq ($(empthread),LWP)
|
ifeq ($(empthread),LWP)
|
||||||
$(srcdir)/tests/smoke-test $(srcdir)
|
$(srcdir)/tests/smoke-test $(srcdir)
|
||||||
else
|
else
|
||||||
|
|
31
tests/fairland-test
Executable file
31
tests/fairland-test
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
# Basic fairland test
|
||||||
|
|
||||||
|
if [ $# -ne 1 ]
|
||||||
|
then echo "Usage: $0 SRCDIR" >&2; exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
srcdir="$1"
|
||||||
|
|
||||||
|
. "$srcdir"/tests/test-common.sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Currently expected to work only with a random() that behaves exactly
|
||||||
|
# like the one on my development system.
|
||||||
|
#
|
||||||
|
if [ "`uname -s`" != "Linux" ] # lame approx. of "random() behaves like mine"
|
||||||
|
then echo "Warning: fairland test not expected to work on this system!" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
create_sandbox
|
||||||
|
|
||||||
|
exec 3>sandbox/fairland.out
|
||||||
|
|
||||||
|
src/util/files -e sandbox/etc/empire/econfig -f >&3
|
||||||
|
src/util/fairland -e sandbox/etc/empire/econfig -s sandbox/newcap_script -R 1 10 30 >&3
|
||||||
|
|
||||||
|
exec 3>&-
|
||||||
|
|
||||||
|
src/util/empdump -e sandbox/etc/empire/econfig -x >sandbox/fairland.xdump
|
||||||
|
|
||||||
|
cmp_out fairland.out fairland.xdump newcap_script
|
60
tests/fairland/fairland.out
Normal file
60
tests/fairland/fairland.out
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
All praise to POGO!
|
||||||
|
Creating a planet with:
|
||||||
|
|
||||||
|
10 continents
|
||||||
|
continent size: 30
|
||||||
|
number of islands: 10
|
||||||
|
average size of islands: 15
|
||||||
|
spike: 10%
|
||||||
|
0% of land is mountain (each continent will have 0 mountains)
|
||||||
|
minimum distance between continents: 2
|
||||||
|
minimum distance from islands to continents: 1
|
||||||
|
World dimensions: 64x32
|
||||||
|
|
||||||
|
|
||||||
|
#*# ...fairland rips open a rift in the datumplane... #*#
|
||||||
|
|
||||||
|
seed is 1
|
||||||
|
placing capitals...
|
||||||
|
growing continents...
|
||||||
|
growing islands: 1(29) 2(1) 3(5) 4(3) 5(12) 6(7) 7(16) 8(7) 9(6) 10(16)
|
||||||
|
elevating land...
|
||||||
|
designating sectors...
|
||||||
|
adding resources...
|
||||||
|
setting coastal flags...
|
||||||
|
writing to sectors file...
|
||||||
|
|
||||||
|
f f f f . % % . . . g g # # g g . . . . . . . . d d d d d . . .
|
||||||
|
f . . f . % % . . g g g g g g g . . . . . . . d # # d d d d . .
|
||||||
|
. . . . . % % % % . g g g g g . . . . . . . . . d d d d d . . .
|
||||||
|
. . . % % % % % % . g g g . . . . . . . . . . . d d d . . . . .
|
||||||
|
. . . . % % % % . % . . g . . . . e e e . . . . d . . . . . . .
|
||||||
|
. . . . . % % . . . . . . . . . . e . e . . . . . . . . . . . .
|
||||||
|
c . . . % % % % . . . . . . . . e e e e e . . . . . . . . . . c
|
||||||
|
c . . . . . . % . . . . . . . e e e e e e . . . . . . c c . . .
|
||||||
|
c . . . . b b . . b . . . . . . . # # e e e . . . . . . c c c c
|
||||||
|
c . . . b b . b b b b b . . . . e e e e e . . . % % . . . c c c
|
||||||
|
c c . . . b b b # # b . . . . . . . e e e . . . % % . . . c # #
|
||||||
|
c . . . b b b b b b . . . . % . . . . e . . . . % . . . . c c c
|
||||||
|
c c . . . . b b b b . . . % % % . . . . . . . . . . . . . . c c
|
||||||
|
c c . . . . b b b b . % % % % % . . . . . . . . . . % % . . . c
|
||||||
|
. . . . . . . . . . . . . % % . . . . . . . % % . . % % % . % .
|
||||||
|
. . . . . . . . . . . . . % . . . . . . % % % % . . % % . % % .
|
||||||
|
. . . a . . . . . . . . . . . . . . . . . . . % . . . . . % % %
|
||||||
|
a a a a a a . . h h . h . . . . % % % % % . . . . . . . . . . .
|
||||||
|
. . a a a a . . h h h h h . . . . % % % % . . . . . . . . . % %
|
||||||
|
. a # # a . . . . h h h h h h . % % % % . . . . . . j j j . % %
|
||||||
|
% . a a a a a . . . h h h h h h . % % % . . j j j j j j . . % %
|
||||||
|
. a a a a a a a . . h # # h h h . . . . . . j j j j j . . % % %
|
||||||
|
% . a a . a . . . . h h h h . . . . . . i . . . j j # # . . . %
|
||||||
|
% . . . . . . . . . . . . . . . . . . i . . . . j j j j . . % %
|
||||||
|
% . . . . . . . . . . . . . . . . . i i . . i . . j j j j . . .
|
||||||
|
. f . . . . . % . . % . . . . . . . i i i i . . . j j j j . . .
|
||||||
|
. . f . . . . . . . % % . . . . . . i # # i i . . . . . . . . .
|
||||||
|
. f f . . . . . . . . . . . . . . . i i i i i i . . . . . . . .
|
||||||
|
f f f f . . . . . . . . . . . . . . . i i i i i . . d . . . . .
|
||||||
|
f f f f . . . . . . . . . . . . . . . . . i i . . d . . . . . f
|
||||||
|
f # # f f . % . . . . . g g g . . . . . . i i . . d d d . . . f
|
||||||
|
f f f f . % % . . g g g g g . . . . . . . i . . d d d d . . . f
|
||||||
|
|
||||||
|
A script for adding all the countries can be found in "sandbox/newcap_script".
|
6116
tests/fairland/fairland.xdump
Normal file
6116
tests/fairland/fairland.xdump
Normal file
File diff suppressed because it is too large
Load diff
21
tests/fairland/newcap_script
Normal file
21
tests/fairland/newcap_script
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
add 1 1 1 p
|
||||||
|
newcap 1 5,19
|
||||||
|
add 2 2 2 p
|
||||||
|
newcap 2 16,10
|
||||||
|
add 3 3 3 p
|
||||||
|
newcap 3 60,10
|
||||||
|
add 4 4 4 p
|
||||||
|
newcap 4 49,1
|
||||||
|
add 5 5 5 p
|
||||||
|
newcap 5 34,8
|
||||||
|
add 6 6 6 p
|
||||||
|
newcap 6 2,30
|
||||||
|
add 7 7 7 p
|
||||||
|
newcap 7 24,0
|
||||||
|
add 8 8 8 p
|
||||||
|
newcap 8 23,21
|
||||||
|
add 9 9 9 p
|
||||||
|
newcap 9 38,26
|
||||||
|
add 10 10 10 p
|
||||||
|
newcap 10 52,22
|
||||||
|
add 11 visitor visitor v
|
Loading…
Add table
Add a link
Reference in a new issue