Commit Graph

388 Commits

Author SHA1 Message Date
Enno Rehling 9185b2af28 simplify test setup: as long as all games have nmr.removenewbie set to off by their config, no test should need to disable it. 2015-07-05 15:23:54 +02:00
Enno Rehling 89ea0b9946 simplify test setup: as long as all games have nmr.removenewbie set to off by their config, no test should need to disable it. 2015-07-05 14:16:17 +02:00
Enno Rehling 03a8c6a89f avoid monsters: only seed new factions in hexes that have no units nearby. 2015-07-05 14:08:06 +02:00
Enno Rehling b2d981e577 improved tests for DESTROY, fix destroy-after-attack 2015-07-03 13:08:06 +02:00
Enno Rehling 37eb189cd0 Merge pull request #242 from badgerman/feature/bug-2080-move-after-destroy
bug 2080: long actions after DESTROY
2015-07-02 11:58:12 +02:00
Enno Rehling fc2b8f3471 bug 2080: long actions after DESTROY
https://bugs.eressea.de/view.php?id=2080
we forgot to set the flags. also added a test for the future.
2015-07-02 11:42:18 +02:00
Enno Rehling a70b0d4902 Merge pull request #241 from badgerman/feature/bug-1890-monster-give-orders
bug 1890: make monsters give GIVE orders
2015-07-02 11:23:13 +02:00
Enno Rehling b53d01eb18 Bug 1890: monsters do not respect the rules when giving excess weight to peasants.
https://bugs.eressea.de/view.php?id=1890
fixed by creating a give order instead of calling give_item directly.
2015-07-02 11:08:38 +02:00
Enno Rehling 258f3c37c0 add test coverage for bug report 2094 (prove that it is invalid) 2015-07-02 08:55:05 +02:00
Enno Rehling e0a383aa24 test the upper limit of the bag, too. 2015-07-01 22:16:43 +02:00
Enno Rehling c634a01a3f Bug 1949: Zauberbeutelverhalten (magic bag tests & config changes)
https://bugs.eressea.de/view.php?id=1949
2015-07-01 22:13:24 +02:00
Enno Rehling 2f21f3c086 Merge remote-tracking branch 'upstream/develop' into develop 2015-07-01 21:28:29 +02:00
Enno Rehling 15e9c5962c merge feature/test-cleanup
removing old test files
merging old tests into current system
fixing some internal bugs (i.e. adjust_coordinates)
2015-07-01 21:24:44 +02:00
Enno Rehling b7b20bdec6 fewer units for new players, two players per region 2015-06-26 14:19:36 +02:00
Enno Rehling 9b7a4e813b functional test for forced leave configuration.
functional test for forced leave after combat.
functional test for MAKE TEMP.
error handling for Lua function building.create().
reduce some errors to warnings.
initialize race.battle_flags correctly (when not created through XML).
re-initialize processor in case config has changed.
handle missing translation of combat status, with error message.
2015-06-19 13:17:01 +02:00
Enno Rehling 6e9f889e77 Merge branch 'master' of github.com:eressea/server
Conflicts:
	src/laws.test.c
2015-06-08 08:47:36 +02:00
Enno Rehling b8de887399 change log level from warn->info 2015-05-24 16:21:12 +02:00
Enno Rehling 59400b1e27 Merge branch 'release-3-5' into develop
Conflicts:
	s/runtests
	src/buildno.h
2015-05-24 14:10:42 +02:00
Enno Rehling 4b721e074d diable test_peasantluck, it fails on master
do not load any config for run-tests.lua
2015-05-24 10:31:11 +02:00
Enno Rehling e9992db51c fix pool test (GiveRestriction broke it).
- do not default to loading the E2 rules for tests, so GiveRestriction
will not be set to a default value.
- only load configuration if a ruleset has been defined.
2015-05-24 09:09:34 +02:00
Enno Rehling 9780ec845f still having problems with GiveRestriction 2015-05-24 07:49:01 +02:00
Enno Rehling e99db198eb bugfix use_item (use_skillpotion did not use pool).
from here on, all use_* functions return the number of items used, and
use_item handles removing them from the unit (or the pool).
2015-05-24 07:17:23 +02:00
Enno Rehling 73fa9a276d Make GiveRestriction default to 0, do not cache the value in a static variable. 2015-05-22 16:23:18 +02:00
Enno Rehling 1c4778e3ef abort tests when non-zero exit-code is returned, fix GiveRestriction for pool tests 2015-05-21 11:05:24 +02:00
Enno Rehling 88f454e1f7 failed tests abort runtests and return an error code
small test world for (future) valgrind tests.
2015-05-21 08:29:22 +02:00
Enno Rehling 657c621582 if the game has no region named Muschelplateau, then ignore this code 2015-05-20 13:05:47 +02:00
Enno Rehling e8fa654a38 test processing and reports for E2 and E3 both 2015-05-20 12:42:30 +02:00
Enno Rehling 455e742116 add a test for writing reports 2015-05-19 23:27:57 +02:00
Enno Rehling d0f8825240 use the syntax_error function where appropriate.
fix bug w. releasing message too soon.
2015-05-18 11:34:52 +02:00
Enno Rehling 177d1c701f Merge branch 'lua-test-framework' of https://github.com/badgerman/eressea into badgerman-lua-test-framework
Conflicts:
	src/kernel/region.c
	src/util/log.h
2015-05-17 17:39:10 +02:00
Enno Rehling 94929be51f Merge pull request #187 from badgerman/develop
Convert all XML files to UTF-8
2015-05-11 23:29:28 -07:00
Enno Rehling a4774be652 Convert all XML files to UTF-8, to allow editing with Atom. 2015-05-11 16:55:11 -07:00
Enno Rehling a4de46dab5 Merge pull request #181 from stm2/missing_curse_name
fix crash of Analyze Magic (mantis bug 2099)
2015-05-10 19:49:57 -07:00
Enno Rehling 82d020701f consistent naming of new players file across scripts and autoseed 2015-05-10 13:56:24 -07:00
Steffen Mecke 05ffb95c65 deactivated write_reports in test, because it's irritating 2015-05-07 18:28:44 +02:00
Steffen Mecke 22e8e39a99 check that analyze magic works 2015-05-07 13:28:37 +02:00
Enno Rehling 42783ff02c binding a magician's spellbook to Lua, with test. 2015-05-05 08:44:58 -07:00
Enno Rehling 5291b32459 new players are now read from a players.txt file
check for duplicates
start with better miners
2015-05-05 14:20:19 +02:00
Enno Rehling e55c2d63bf remove email address
should not put player emails in the source of this script, obfuscating to prevent misuse
2015-05-04 22:23:18 +02:00
Enno Rehling 24dbe64ef7 new players: more money, entertainers. 2015-05-03 23:23:21 +02:00
Enno Rehling b00d7b6d5a increase magic power for low levels in E3 (instead of divide by 2 sometimes giving powers of < 1.0, cap it below at 1)
several spells have now had problems with powers lower than they were ever designed for, including shapeshift
also added a test and some framework for shapeshift spell (in E2).
https://bugs.eressea.de/view.php?id=1588
2015-04-30 15:59:52 +02:00
Enno Rehling 6c4e74bc25 as-hoc scripts for seeding new players into old game 2015-04-30 15:22:06 +02:00
Enno Rehling a5e68e10fe test for FOLLOW SHIP 2015-04-20 15:19:17 +02:00
Enno Rehling d2fbdec831 re-enable disabled tests for E2, add test for FOLLOW. 2015-04-20 15:07:10 +02:00
Enno Rehling a5da77c376 Merge pull request #168 from badgerman/hotfix-3-4-5
tests for volcanooutbreak and spyreport messages
2015-04-10 11:13:44 +02:00
Enno Rehling 224a9af33c Test "guarding makes ATTACK a short command"
https://bugs.eressea.de/view.php?id=1493
expose unit.guard values to Lua
2015-04-09 12:19:17 +02:00
Enno Rehling b1c27ac210 Test legal movement of dolphins.
There were some unsubstantiated reports of dolphins possibly being able to walk on land, but tests do not confirm this.
2015-04-09 01:41:16 +02:00
Enno Rehling 168fa02e68 for reasons, sometimes libxml2 is not compile, and all tests will fail. detect that. 2015-04-06 17:49:40 +02:00
Enno Rehling 4fb0c133e8 enable json reports for develop branch 2015-04-05 12:50:10 +02:00
Enno Rehling cda55ef8fb Merge pull request #160 from badgerman/feature-jsreport
JSON reports
2015-04-04 09:39:36 +02:00
Enno Rehling d8c1f03f55 new module to enable jsreport for selected factions. 2015-04-04 09:19:10 +02:00
Enno Rehling 757e196973 remove the change_locales code, this feature was moved in eressea/locales.lua some time ago 2015-04-04 08:55:58 +02:00
Enno Rehling 8edafa19c5 fix faction.create locale handling 2015-03-13 20:39:36 +01:00
Enno Rehling 654ee9e6bf minimal script to load configuration in an interactive session 2015-03-07 14:33:38 +01:00
Enno Rehling 677f0903cb fix broken tests (they were fixed in master, but not in develop?) 2015-03-07 14:11:32 +01:00
Enno Rehling cad154ac59 re-enable silver weight
Conflicts:
	scripts/tests/e3/rules.lua
	scripts/tests/faction.lua
2015-03-07 13:58:44 +01:00
Enno Rehling 491f6f2cb3 re-enable silver weight 2015-03-07 13:56:31 +01:00
Enno Rehling 02e43d2772 fix a crash in the ancient wedding code? 2015-03-06 22:38:27 +01:00
Enno Rehling b68e2a983e added tests to make sure volcanooutbreak and spyreport are no longer empty messages. 2015-02-22 22:31:50 +01:00
Enno Rehling ffbfdee4ff whitespace changes 2015-02-20 20:35:02 +01:00
Enno Rehling 45b77c9993 Merge branch 'repairing_lua_tests' of https://github.com/CTD1/eressea-server-bugfixing into CTD1-repairing_lua_tests
Conflicts:
	scripts/run-tests.lua
2015-02-20 20:28:36 +01:00
Enno Rehling cbb88d0d11 Merge pull request #150 from badgerman/bug-2077-ents
Bug 2077: ents were created as undead
2015-02-19 19:32:59 +01:00
Enno Rehling 4eed731b8f repair bad ents, do not create them as undead. 2015-02-19 17:30:13 +01:00
Enno Rehling 426aeee076 Make tests return the number of errors as exit code. 2015-02-16 16:59:07 +01:00
CTD 8f21aa7a11 repairing lua tests
Das ist totales Chaos, viele Testcases wurden einfach nicht ausgeführt
weil sie nicht in den init files stehen.
Etwas neu strukturiert, Test laufen jetzt auch wenn sie nicht aus dem
eressea root Ordner gestartet werden wie in s/runtest und es sind einige
Testcases mehr als bisher. Auch macht Travis jetzt die E3 Test. Dabei
ist ein schwerwiegender Fehler beim neuen Bewache aufgefallen!
2015-02-13 16:03:05 +01:00
Enno Rehling c3ed521d4f Merge branch 'version-3-4' of https://github.com/badgerman/eressea into badgerman-version-3-4
Conflicts:
	src/laws.c
2015-01-29 18:03:21 +01:00
Enno Rehling 7527e6e903 disable silver weight for the initial rollout of version 3.4
two weeks after launch, revert this commit
2015-01-29 16:56:21 +01:00
Enno Rehling 6fb23af66a test that ships are encumbered by money. define money in XML, not just in code. 2015-01-14 17:56:12 +01:00
Enno Rehling 468882f974 test that money has weight, add weight in init_resources (TODO: use the config files). 2015-01-14 07:46:42 +01:00
CTD ac3195851a Erstmal nur der Burgenbonus
Das mit der Größe kommt noch mal extra, der Übersicht wegen.
Sinvoller weise kann man den Bonus jetzt in der castle.xml einstellen.
Mit neuen Defaultwerten in den XML Dateien.
2015-01-09 15:53:14 +01:00
Enno Rehling d3524b9eab do not write reports from tests 2015-01-04 16:43:47 +01:00
Enno Rehling 3db403d7fd functional test for GROW/BREED horses (Bug 1886) 2015-01-04 15:42:36 +01:00
Enno Rehling 0aa002a6d2 Functional test for bug 1882: Verify that COMBAT/FIGHT/KÄMPFE have the desired effect. 2015-01-04 13:20:11 +01:00
Enno Rehling 14b1a164ed when tests are modifying important global state, they should reset it in teardown.
TODO: actually, they probably should not modify state in the first place.
2015-01-03 16:11:33 +01:00
Enno Rehling 4ed469c126 do not try setting luxury demand on oceans.
add some old E3 tests, disable those that have rotted.
2015-01-01 10:12:03 +01:00
Enno Rehling 9453aff7f5 fix running game-specific tests for E3, add them to the test suite. 2014-12-31 21:07:42 +01:00
Enno Rehling f524f23cd4 superfluous semicolons and other small stuff.
missing strings are an error, not a warning.
2014-12-31 13:17:54 +01:00
Enno Rehling 880b965c54 Merge branch 'version-3-3'
Conflicts:
	src/build.h
2014-12-28 17:29:34 +01:00
Enno Rehling df3ce116a7 limit eternath gates to 1-person units, avoid crash 2014-12-27 23:51:48 +01:00
Enno Rehling 9ac90dd6a5 bugfix: USE snowman did not check that the unit actually owned a snowman, causing a unit to have negative snowmen in turn 629 (exploit). 2014-12-13 23:20:10 +01:00
Enno Rehling e5d53769df lock files to prevent accidents.
preview will only run if the turn worked out.
cannot accidentally run in the game directory.
2014-12-11 12:19:31 +01:00
Enno Rehling 20234ca27a lock files to prevent accidents.
preview will only run if the turn worked out.
cannot accidentally run in the game directory.
2014-12-11 12:19:04 +01:00
Enno Rehling 9c6b7af27f fix a bug in the eternath quest gates (re-running old turn sometimes needs this). 2014-12-11 09:15:19 +01:00
Enno Rehling 6438d6807e accepting Don's changes to the setup script.
back-filling test for faction.get and get_faction.
2014-11-26 18:37:07 +01:00
Enno Rehling 7b2d1991d8 add missing file, fix factions that lack a locale. 2014-11-23 21:15:09 +01:00
Enno Rehling f92df416ff monsters need a default locale, or their report will crash (thanks, Don!)
- empty factions have not seen any region, prevent the code from crashing in that case.
- must load the rules even when only writing the reports (taxation affects guards?)
2014-11-23 15:50:22 +01:00
Enno Rehling 49493fa630 fix typo in last commit.
package is a standard lua module, not a good variable name.
log name of script.
2014-11-06 07:53:15 +01:00
Enno Rehling 143fab9653 Some changes after talking to Don.
moved locale change into its own module.
made monsters get a report by default.
reoved old creation.c code, it was dead.
2014-11-06 07:15:53 +01:00
Enno Rehling 93e20ac7a9 clean up data files after tests are finished. 2014-11-04 08:06:46 +01:00
Enno Rehling b2140f54fd refactor, move give_cmd into give.c 2014-11-03 08:44:26 +01:00
Enno Rehling 6bd52012c0 read keywords from json configuration, use German imperative forms. 2014-10-29 19:40:09 +01:00
Enno Rehling f9c5d58f41 read json config file if available.
missed an include, broke the build.
2014-10-29 08:30:07 +01:00
Enno Rehling cd470d5e27 fix string concatenation operator 2014-10-16 14:33:20 +02:00
Enno Rehling 7987b82c62 remove obsolete scripts and module definitions.
a lot of these were from before the module rewrite, and duplicates of the new code.
2014-10-14 18:55:44 +02:00
Enno Rehling 61a1b6fafd useful scripts for setting up the game.
fix silver->money in the build scripts.
config.lua: load the game configuration
reports.lua: write the reports for the (initial) turn
2014-10-10 20:19:04 +02:00
Enno Rehling 206e0a2fc5 Accidentally deleted initial path logic.
This code is important for bootstrapping the LUA_PATH
2014-08-12 23:15:35 +02:00
Enno Rehling f0ac736bd1 map script needs to set up the script folder. 2014-08-12 23:06:44 +02:00
Enno Rehling 91ec503b43 fix the mapper script.
1. move xml configuration reading to a separate module, it's compliated.
2. move the map file to the main scripts folder.
2014-08-12 22:54:55 +02:00
Enno Rehling 3c2ae7ca93 preview script and logging cleanup
1. all log messages will be terminated with \n, whether the user provided
	it or not.
2. remove a bunch of print() calls from scripts to reduce clutter
3. replace printf calls with log_* calls to reduce clutter
4. add the new release preview script
2014-08-11 12:04:12 +02:00
Enno Rehling 130f6401b7 No christmas trees in E4
- Bugfix for http://bugs.eressea.de/view.php?id=2019
- removing some old tests
2014-08-10 23:07:25 +02:00
Enno Rehling 91eead0993 fix test runner 2014-08-07 13:23:11 +02:00
Enno Rehling d2bee4e185 new test script, rule-independent tests. 2014-08-07 13:19:19 +02:00
Enno Rehling 7348ce698b add config.path parsing to a module of its own. 2014-08-06 23:47:16 +02:00
Enno Rehling 71056cc2e5 in Lua 5.2, table.getn no longer exists 2014-08-03 20:51:22 +02:00
Enno Rehling afd41286b5 config file reading based on game name and install location. 2014-08-03 20:37:05 +02:00
Enno Rehling ebe078df61 replace backslash with forward for unix-style paths 2014-08-03 12:43:16 +02:00
Enno Rehling 9cb0deb4f9 Eressea tests, rewritten 2014-08-02 23:17:55 +02:00
Enno Rehling 44c89e26ec Lua module rewrite, part deux.
rules for E3 and E4
some missing files.
2014-07-26 23:41:56 +02:00
Enno Rehling d994caf7a3 Merge branch 'master' of https://github.com/eressea/server 2014-07-26 22:52:31 +02:00
Enno Rehling d9457a2488 rewrite of the Lua module system.
At this time, only E2 is working.
Fixing a lot of old code (monster is no longer id 0).
package.paths configured from eressea.ini
install directory configured from eressea.ini
moving building_action into a seaprate module (it's deprecated)
2014-07-26 22:52:25 +02:00
Enno Rehling 67cf73d42c update ini files so tests will pass again 2014-07-23 16:01:56 +02:00
Enno Rehling 30e9565ae6 update config files to use game.rules from eressea.ini.
ToDo: set rules from command line with -r
2014-07-23 12:19:24 +02:00
Enno Rehling fbe9822e9c mpve sceipts tp the roght place. 2014-07-19 23:55:41 +02:00
CTD1 aae6ac34d9 Bug 0002014: Zwergenausrüstung kann nicht hergestellt werden
Testcase auf Rasse Halbling geändert.
2014-07-15 15:37:09 +02:00
Enno Rehling b2b35fd9d0 add a test for the E3 reduced give quota.
foreign units receive only 50% of silver given to them.

Conflicts:
	tests/pool.lua
2014-07-07 03:41:33 +02:00
Enno Rehling 88f9d247bd Revert "use race::flags|RCF_NOGIVE instead of race::ec_flags|GIVEITEM"
E3 Tests (GIVE) did not pass.

This reverts commit 5ec3f5b83a.
2014-07-06 00:29:52 -07:00
TomBraun 9930324619 Change test for bug 0001976
Conflicts:
	scripts/tests/eressea.lua
2014-07-04 22:44:28 -07:00
Enno Rehling 5011d3f6ff some touching up to the new test here 2014-07-04 22:42:13 -07:00
TomBraun 783df84055 BUG owner of a building can't enter ship
If owner of a building want to enter a ship or other building,
he must first leave the bulding.
Commands are "leave" and "enter <ship/tower> <ID>".
For buildings was that OK but not for ships.
The building owner was inside the region after that commans
and not in the ship.
2014-07-04 22:31:09 -07:00
Enno Rehling 8fc137d780 Expose the "working" flag for buildings to Lua.
Test working vs. unpaid harbour landigns with a ship.
2014-07-04 22:12:12 -07:00
Enno Rehling 7a6b237de0 Merge branch 'master' of github.com:TomBraun/server into TomBraun-master
Conflicts:
	src/kernel/build.c
	src/kernel/item.c
2014-06-29 20:05:44 -07:00
TomBraun 50ff812bb8 Add test Iron Golems now use the corect number of iron.
Test also Iron Golems can now create dwarfen only items
(makes irongolems usable for dwarfs)
2014-06-25 13:26:34 +02:00
TomBraun fa9ac186d7 Test a bug that crasehed the server
when Stonegolems created a new building and
the whole unite was consumed during this process
(could not enter the new building as no one was left in the unit)
2014-06-25 13:20:00 +02:00
Enno Rehling 7adb8498aa Merge branch 'fix_block_movement' of github.com:stm2/server into stm2-fix_block_movement
Conflicts:
	scripts/tests/eressea.lua
	src/kernel/move.c
2014-06-23 20:34:07 -07:00
Enno Rehling 24dc006e43 fix json config for terrains, some other stuff. 2014-06-13 17:36:05 -07:00
Enno Rehling 2033aabf60 new test suite, moving to new directory. 2014-06-13 17:35:43 -07:00
Enno Rehling 6e56c56d39 read ships from config file (only very basic) and create them in a lua test. 2014-06-13 08:28:33 -07:00
Enno Rehling d503937999 working on making json config understand ships and buildings.
new tests in progress.
remove giveitem.c attribute, the name clashed with a trigger,
and it was only part of an arena that is gone from the game, I think.
2014-06-12 22:14:07 -07:00
Enno Rehling 30c1b0e1ff new lua test framework, work in progress. 2014-06-12 17:41:03 -07:00
Steffen Mecke dc3eea0c70 take best unit and count amulet at most once for guards blocking movement 2014-06-04 11:04:17 +02:00
Enno Rehling fa256360b9 eliminate kill_nonstarters 2014-06-03 06:29:33 +02:00
Enno Rehling 77a3dc91d5 disable test, because bug 1738 is still not fixed 2014-06-02 05:49:34 +02:00
Enno Rehling 2587c069b4 quick mapping tool 2014-05-10 19:00:50 +02:00
Enno Rehling 75b7ac3064 new turn processing script,
add adamantium to config
2014-04-27 02:59:02 +02:00
Enno Rehling 94e8a65d4f processing scripts and tools 2014-04-25 08:41:52 +02:00
Enno Rehling 35c2baafbe do not read turn file for turn 0 2014-04-25 07:47:23 +02:00
Enno Rehling 443583a6d6 fix intermittent test for e3 building owners 2014-03-17 08:52:33 +01:00
Enno Rehling 6e3ed568ea fix lua test for blessed harvest. 2014-03-17 08:21:35 +01:00
Thomas Troeger d2267db53a - minor spelling fix. 2014-03-16 23:18:00 +01:00
Thomas Troeger 33b68ecc19 - moved test for bug 1738 to better location. 2014-03-16 23:17:48 +01:00
Enno Rehling e350b8a146 rebuild lua bindings
fix json export
add a script to reset submodules
2014-03-16 02:12:49 -07:00
Enno Rehling e8b28725e1 do not run tolua inside MSVC
The cmake rules for this do not work.
2014-03-08 04:28:04 -08:00
Enno Rehling a774f882e5 fix a test that compared structs 2014-01-07 06:47:20 +01:00
Enno Rehling 7b86db29d7 Fixing some last holdouts from the eressea->core rename. 2013-12-30 09:29:18 +01:00
Enno Rehling ca79c28eaf kill empty folder 2013-12-27 01:07:55 +01:00
Enno Rehling 64046250d4 confusion, merge latest changes 2013-02-23 17:27:50 -08:00
Enno Rehling eff21f8b51 write_game lives in the eressea module now 2013-01-28 17:52:44 -08:00
Enno Rehling e378397fb4 searching for bug where owners leave castle 2012-08-03 00:52:24 -07:00
Enno Rehling d5443f88d8 laen test does not work. trying to make setresource add the raw material to fix it 2012-08-02 00:06:22 -07:00
Enno Rehling ba328d913e math.mod is deprecated 2012-07-10 09:22:51 +02:00