~ubuntu-branches/ubuntu/precise/glib2.0/precise-updates

« back to all changes in this revision

Viewing changes to glib/tests/regex.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-01-10 16:23:46 UTC
  • mfrom: (1.59.35)
  • Revision ID: package-import@ubuntu.com-20120110162346-5s54yf7s1va1zb6i
Tags: 2.31.8-0ubuntu1
* New upstream version, drop patch which is in the new version
* debian/libglib2.0-0.symbols: new version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
typedef struct _Match Match;
203
203
 
204
204
static void
205
 
free_match (gpointer data, gpointer user_data)
 
205
free_match (gpointer data)
206
206
{
207
207
  Match *match = data;
208
208
  if (match == NULL)
268
268
    }
269
269
 
270
270
  g_regex_unref (regex);
271
 
  g_slist_foreach (matches, free_match, NULL);
272
 
  g_slist_free (matches);
 
271
  g_slist_free_full (matches, free_match);
273
272
}
274
273
 
275
274
#define TEST_MATCH_NEXT0(_pattern, _string, _string_len, _start_position) { \
2298
2297
  TEST_MATCH("a#\nb", G_REGEX_EXTENDED, G_REGEX_MATCH_NEWLINE_CR, "a", -1, 0, 0, FALSE);
2299
2298
  TEST_MATCH("a#\nb", G_REGEX_EXTENDED | G_REGEX_NEWLINE_CR, 0, "a", -1, 0, 0, TRUE);
2300
2299
 
 
2300
  /* This failed with PCRE 7.2 (gnome bug #455640) */
 
2301
  TEST_MATCH(".*$", 0, 0, "\xe1\xbb\x85", -1, 0, 0, TRUE);
 
2302
 
2301
2303
  /* TEST_MATCH_NEXT#(pattern, string, string_len, start_position, ...) */
2302
2304
  TEST_MATCH_NEXT0("a", "x", -1, 0);
2303
2305
  TEST_MATCH_NEXT0("a", "ax", -1, 1);