Lines Matching refs:str1
268 char *str1, *str2; in test_semanage_str_replace() local
270 str1 = semanage_str_replace("%{USERNAME}", "root", test_str, 0); in test_semanage_str_replace()
271 CU_ASSERT_STRING_EQUAL(str1, "Hello, I am root and my id is %{USERID}"); in test_semanage_str_replace()
273 str2 = semanage_str_replace("%{USERID}", "0", str1, 1); in test_semanage_str_replace()
275 free(str1); in test_semanage_str_replace()
278 str1 = semanage_str_replace(":(", ";)", "Test :( :) ! :(:(:))(:(", 0); in test_semanage_str_replace()
279 CU_ASSERT_STRING_EQUAL(str1, "Test ;) :) ! ;);):))(;)"); in test_semanage_str_replace()
280 free(str1); in test_semanage_str_replace()
282 str1 = semanage_str_replace(":(", ";)", "Test :( :) ! :(:(:))(:(", 3); in test_semanage_str_replace()
283 CU_ASSERT_STRING_EQUAL(str1, "Test ;) :) ! ;);):))(:("); in test_semanage_str_replace()
284 free(str1); in test_semanage_str_replace()
286 str1 = semanage_str_replace("", "empty search string", "test", 0); in test_semanage_str_replace()
287 CU_ASSERT_EQUAL(str1, NULL); in test_semanage_str_replace()
289 str1 = semanage_str_replace("a", "", "abracadabra", 0); in test_semanage_str_replace()
290 CU_ASSERT_STRING_EQUAL(str1, "brcdbr"); in test_semanage_str_replace()
291 free(str1); in test_semanage_str_replace()