Author: suokko
Date: Wed Sep 3 12:04:46 2008
New Revision: 29239
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29239&view=rev
Log:
Leading space loading test case
Added:
trunk/data/test/test/leading_space.cfg
Modified:
trunk/src/tests/test_config_cache.cpp
Added: trunk/data/test/test/leading_space.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/test/test/leading_space.cfg?rev=29239&view=auto
==============================================================================
--- trunk/data/test/test/leading_space.cfg (added)
+++ trunk/data/test/test/leading_space.cfg Wed Sep 3 12:04:46 2008
@@ -1,0 +1,3 @@
+[test_lead_space]
+ space=empty char in middle
+[/test_lead_space]
Modified: trunk/src/tests/test_config_cache.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tests/test_config_cache.cpp?rev=29239&r1=29238&r2=29239&view=diff
==============================================================================
--- trunk/src/tests/test_config_cache.cpp (original)
+++ trunk/src/tests/test_config_cache.cpp Wed Sep 3 12:04:46 2008
@@ -285,6 +285,17 @@
cache.set_force_not_valid_cache(false);
}
+BOOST_AUTO_TEST_CASE( test_lead_spaces_loading )
+{
+ config test_config;
+ test_config.add_child("test_lead_space")["space"] = "empty char in
middle";
+ // Force reload of cache
+ cache.set_force_not_valid_cache(true);
+ BOOST_CHECK_EQUAL(test_config,
*cache.get_config("data/test/test/leading_space.cfg"));
+ cache.set_force_not_valid_cache(false);
+ BOOST_CHECK_EQUAL(test_config,
*cache.get_config("data/test/test/leading_space.cfg"));
+}
+
#if 0
// for profiling cache speed
BOOST_AUTO_TEST_CASE( test_performance )
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits