| 148 | } |
| 149 | |
| 150 | static void |
| 151 | test_has_prefix (void) |
| 152 | { |
| 153 | g_assert_true (has_prefix ("foo", "foo")); |
| 154 | g_assert_true (has_prefix ("foobar", "foo")); |
| 155 | g_assert_false (has_prefix ("foobar", "fool")); |
| 156 | g_assert_false (has_prefix ("foo", "fool")); |
| 157 | g_assert_true (has_prefix ("foo", "")); |
| 158 | g_assert_true (has_prefix ("", "")); |
| 159 | g_assert_false (has_prefix ("", "no")); |
| 160 | g_assert_false (has_prefix ("yes", "no")); |
| 161 | } |
| 162 | |
| 163 | static void |
| 164 | test_has_path_prefix (void) |