gtksourceview3/testsuite/test-regex.c

46 lines
1.4 KiB
C

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*- */
/*
* This file is part of GtkSourceView
*
* Copyright (C) 2013 - Paolo Borelli
*
* GtkSourceView is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* GtkSourceView is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtk/gtk.h>
#include <gtksourceview/gtksource.h>
#include "gtksourceview/gtksourceregex.h"
static void
test_slash_c_pattern (void)
{
GtkSourceRegex *regex;
GError *error = NULL;
regex = _gtk_source_regex_new ("\\C", 0, &error);
g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_COMPILE);
g_assert (regex == NULL);
}
int
main (int argc, char** argv)
{
gtk_test_init (&argc, &argv);
g_test_add_func ("/Regex/slash-c", test_slash_c_pattern);
return g_test_run();
}