summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-02 19:08:29 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-02 19:08:29 +0200
commit722cc78e6f2105108225212a0960f1b928fa71f2 (patch)
treeba6bd98532317db4127eff2ebd694a5d3c2ba38e /tests
parent5ae90b6d54c533f97e9033a3ccd4ab1109c6977d (diff)
downloadedoors-722cc78e6f2105108225212a0960f1b928fa71f2.zip
edoors-722cc78e6f2105108225212a0960f1b928fa71f2.tar.gz
eiotas_particle_split_dst: to keep actual stringshare, check length && strncmp
Diffstat (limited to 'tests')
-rw-r--r--tests/particle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/particle.c b/tests/particle.c
index 2ee4951..199df27 100644
--- a/tests/particle.c
+++ b/tests/particle.c
@@ -106,10 +106,10 @@ void test_particle()
check_cond((p2->cur_action==NULL),"action must be NULL");
eiotas_particle_next_dst(p2);
- eiotas_particle_destinations_add(p2,"door?get");
+ eiotas_particle_destinations_add(p2,"doora?get");
eiotas_particle_split_dst(p2);
check_str((char*)p2->cur_action,"get","action is wrong");
- check_str((char*)p2->cur_door,"door","door is wrong");
+ check_str((char*)p2->cur_door,"doora","door is wrong");
check_cond((p2->cur_room==NULL),"room must be NULL");
eiotas_particle_next_dst(p2);
@@ -127,10 +127,10 @@ void test_particle()
check_str((char*)p2->cur_room,"room/room","room is wrong");
eiotas_particle_next_dst(p2);
- eiotas_particle_destinations_add(p2,"room/room/door?get");
+ eiotas_particle_destinations_add(p2,"room/room/doorb?get");
eiotas_particle_split_dst(p2);
check_str((char*)p2->cur_action,"get","action is wrong");
- check_str((char*)p2->cur_door,"door","door is wrong");
+ check_str((char*)p2->cur_door,"doorb","door is wrong");
check_str((char*)p2->cur_room,"room/room","room is wrong");
p3 = eiotas_require_particle(dom0);