Changes in tests/check_jabber_util.c [842cd8d:98de2cc]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/check_jabber_util.c
r842cd8d r98de2cc 14 14 15 15 budw1 = jabber_buddy_add( ic, "wilmer@gaast.net/BitlBee" ); 16 budw1->last_ msg= time( NULL ) - 100;16 budw1->last_act = time( NULL ) - 100; 17 17 budw2 = jabber_buddy_add( ic, "WILMER@gaast.net/Telepathy" ); 18 18 budw2->priority = 2; 19 budw2->last_ msg= time( NULL );19 budw2->last_act = time( NULL ); 20 20 budw3 = jabber_buddy_add( ic, "wilmer@GAAST.NET/bitlbee" ); 21 budw3->last_ msg= time( NULL ) - 200;21 budw3->last_act = time( NULL ) - 200; 22 22 budw3->priority = 4; 23 23 /* TODO(wilmer): Shouldn't this just return budw3? */ … … 60 60 fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/Telepathy" ) ); 61 61 fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/telepathy" ) ); 62 63 /* Test activity_timeout and GET_BUDDY_BARE_OK. */ 64 fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) == budw1 ); 65 budw1->last_msg -= 50; 66 fail_unless( ( bud = jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) ) != NULL ); 67 fail_unless( strcmp( bud->full_jid, "wilmer@gaast.net" ) == 0 ); 62 fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 ); 68 63 69 64 fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) ); 70 65 fail_unless( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) == budw1 ); 71 66 72 fail_if( jabber_buddy_remove( ic, "wilmer@gaast.net" ) );73 fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/bitlbee" ) );74 fail_unless( jabber_buddy_remove( ic, "wilmer@gaast.net/BitlBee" ) );75 fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", GET_BUDDY_BARE_OK ) );76 77 67 /* Check if remove_bare() indeed gets rid of all. */ 78 /* disable this one for now.79 68 fail_unless( jabber_buddy_remove_bare( ic, "wilmer@gaast.net" ) ); 80 69 fail_if( jabber_buddy_by_jid( ic, "wilmer@gaast.net", 0 ) ); 81 */82 70 83 71 fail_if( jabber_buddy_remove( ic, "nekkid@lamejab.net/Illegal" ) ); 84 72 fail_unless( jabber_buddy_remove( ic, "nekkid@lamejab.net" ) ); 85 73 fail_if( jabber_buddy_by_jid( ic, "nekkid@lamejab.net", 0 ) ); 86 87 /* Fixing a bug in this branch that caused information to get lost when88 removing the first full JID from a list. */89 jabber_buddy_add( ic, "bugtest@google.com/A" );90 jabber_buddy_add( ic, "bugtest@google.com/B" );91 jabber_buddy_add( ic, "bugtest@google.com/C" );92 fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/A" ) );93 fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/B" ) );94 fail_unless( jabber_buddy_remove( ic, "bugtest@google.com/C" ) );95 74 } 96 75 … … 106 85 jd->buddies = g_hash_table_new( g_str_hash, g_str_equal ); 107 86 set_add( &ic->acc->set, "resource_select", "priority", NULL, ic->acc ); 108 set_add( &ic->acc->set, "activity_timeout", "120", NULL, ic->acc );109 87 110 88 suite_add_tcase (s, tc_core);
Note: See TracChangeset
for help on using the changeset viewer.