summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* tests/testsuite: Avoid g_auto*master-msvcChun-wei Fan2021-10-221-1/+2
| | | | This way, things will continue to build on Visual Studio.
* testsuite: ensure backreference is not unescapedChristian Hergert2021-07-281-0/+4
|
* testsuite: add failing test for move-wordsChristian Hergert2021-07-281-0/+51
| | | | This is the test case we needed from #190 to actually verify a bug fix.
* testsuite: add test to load all language specsChristian Hergert2021-07-152-0/+98
|
* testsuite: fix issue idChristian Hergert2021-07-051-2/+2
|
* searchsearchcontext: use PCRE2 for regex searchingChristian Hergert2021-07-051-0/+24
| | | | | | | | | | | | | | | | | | | When porting to PCRE2, we only implemented the syntax highlighting engine because there was a lot to port. That meant we used PCRE for search contexts (via GRegex), but PCRE2 for highlighting. Now that we have enough implementation in our PCRE2 wrapper, we can make use of ImplRegex for search contexts too. It's possible we have some fallout, but for what I've seen in the wild thus far, the bases seem to be covered. It's unlikely that we'll backport this to GtkSourceView 3.x or 4.x series. However, if there is enough interest for someone to do that work and really test it on platforms in the wild, we'd be willing to manage that upstream with them. Fixes #138
* testsuite: disable JIT for comparisonsChristian Hergert2021-07-051-1/+2
| | | | We need additional work to make things match exactly with JIT enabled.
* testsuite: match flags from search context usageChristian Hergert2021-07-041-45/+47
| | | | | The goal here is to be able to use PCRE2 from search-context, so we want to test that usage to find any issues.
* testsuite: a few more regex testsChristian Hergert2021-07-041-0/+16
|
* testsuite: more regex comparison testsChristian Hergert2021-07-041-25/+76
|
* testsuite: test some match info flagsChristian Hergert2021-07-021-0/+3
|
* testsuite: allow testing match flagsChristian Hergert2021-07-021-17/+18
|
* testsuite: remove debug codeChristian Hergert2021-07-021-3/+0
|
* implregex: make matching closer to gregexChristian Hergert2021-07-021-0/+6
|
* testsuite: add test to compare regex implementationsChristian Hergert2021-07-021-0/+103
|
* testsuite: load syntax tests as part of testsuiteChristian Hergert2021-02-112-0/+129
| | | | | | | This is a barebones test to make sure that we can load some of our files from the tests/syntax-highlighting/ directory. Ideally, we would process more of this so we can find errors with PCRE2 loading, but this is a first step in that direction.
* tests: ignore content-type check on __APPLE__Christian Hergert2020-11-061-0/+2
| | | | | This doesn't hold up everywhere depending on the content engine behind things in GLib. So we can't guarantee this on Mac.
* build: remove old completion model testChristian Hergert2020-09-212-643/+0
|
* track gtk_widget_destroy() and container changes in GTKChristian Hergert2020-09-211-2/+2
|
* testsuite: track gtk_main changesChristian Hergert2020-09-212-4/+12
|
* testsuite: remove deprecated gtk_main API usageChristian Hergert2020-09-211-2/+2
|
* testsuite: port away from gtk_main* APIChristian Hergert2020-09-211-7/+23
|
* fix const'ness of search-path usage in various managersChristian Hergert2020-09-215-5/+6
| | | | | | | These should be "const gchar * const *" since we're breakin API/ABI anyway. This is not an ABI break, but it will cause warnings in existing code that was passing "gchar**". This is more correct however since we do not take any references or mutate the strings, or pointer to strings.
* modeline: remove modelines from sources and headersChristian Hergert2020-09-2117-17/+0
| | | | | These are no longer necessary per updates to HACKING. So remove them to be consistent with our suggested contributions.
* tests: port tests to GTK 4Christian Hergert2020-09-211-0/+3
| | | | | Most notably, using gtk_init(), adapting to <layout> changes in GTK 4 Builder XML, and renderers becoming widgets.
* undo: remove GtkSourceUndoManagerChristian Hergert2020-09-212-919/+0
| | | | | | | | Undo is now managed by GTK itself (with a more memory compact form of the undo manager from GtkSourceView). It has the added benefit that it is run from the default GtkTextBuffer handlers right next to the code that mutates the B-Tree, meaning that we have a better chance at avoiding reply/reordering issues which can happen today.
* completion: use G_DEFINE_INTERFACEChristian Hergert2020-09-211-2/+2
|
* completion: modernize GtkSourceCompletionModelChristian Hergert2020-09-211-1/+1
| | | | | | - Use G_DECLARE_ - Remove use of private instance - Move to -private.h
* buffer: modernize GtkSourceBufferOutputStreamChristian Hergert2020-09-211-14/+14
| | | | | | | - Use G_DECLARE_ - Move to -private.h - Make final - Fix multi-line function indentation
* words: add various -private.h headersChristian Hergert2020-09-211-1/+1
| | | | Keep G_GNUC_INTERNAL things inside of -private.h headers.
* regex: add gtksourceregex-private.hChristian Hergert2020-09-211-1/+1
|
* scheme: add gtksourcestylescheme-private.hChristian Hergert2020-09-211-0/+1
|
* iter: move gtksourceiter.h to gtksourceiter-private.hChristian Hergert2020-09-211-1/+1
|
* buffer: modernize GtkSourceBufferInputStreamChristian Hergert2020-09-211-1/+2
| | | | | | - Use G_DECLARE_ - Make final - Use private header
* build: give testsuite access to gresourcesChristian Hergert2020-09-211-1/+1
| | | | | This can get dropped when using the static linking, so we need to ensure we compile it in instead.
* build: use static libraries for testsuiteChristian Hergert2020-01-291-3/+12
| | | | | This will allow us to use more aggressive optimizations on the primary libgtksourceview-4.so such as -Wl,Bsymbolic and -fno-plt.
* testsuite: ignore project-wide settings for assertionsChristian Hergert2020-01-291-0/+2
| | | | | We always want assertions as part of the testsuite, even when running release or plain builds as done by distros.
* build: include stdlib.h for exit()Christian Hergert2020-01-293-0/+3
|
* stylescheme: add support for fallback style-idsChristian Hergert2019-11-042-2/+20
| | | | | | | As we try to make styles more declarative, we need a fallback to ensure that we don't break existing style-schemes in the wild. Related to !77
* testsuite: use g_assert_* macros instead of g_assert()Christian Hergert2019-09-1219-214/+214
| | | | Fixes #43
* build: set NO_AT_BRIDGE=1 in testsChristian Hergert2019-09-091-0/+1
| | | | | | On various beta systems for GNOME 3.34, we might not have access to the at-bridge. This fixes the test system to work without it, which isn't really something we want to be specifically testing anyway.
* build: remove autotoolsChristian Hergert2019-04-271-139/+0
| | | | | We have fully transitioned to meson now, so it is time to remove the venerable autotools.
* meson: Fix Visual Studio DLL buildsChun-wei Fan2019-04-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, Visual Studio builds do not really like the concept of linking 2 static libraries and not using any sources for building a given DLL (it will not include those items when linking the final DLL as it will optimize most of the items out as the linker does not believe those items are being really used in the final DLL), so we need to do the following for the Visual Studio builds: -Define a separate GtkSourceView shared library target that contain the core sources *and* the word completion provider sources, along with the generated glib-mkenums and GResource sources. This is actually how the Visual Studio projects build the sources for the GtkSourceView DLL, due to the same reasoning. -Declare the various internal dependencies accordingly; note that we still need the static core library for building the test programs. This means that on Visual Studio builds we need to build the core sources 2 times, it seems that this is unavoidable at this point. The build files for the tests in tests/ and testsuite/ has been updated accordingly so that things will build and link. Note that for the test-stylescheme test, we need to ensure that we only link to the static core library, otherwise it will fail to link. -Update the enumeration source generating process, so that we include config.h during the build and so ensure that the symbols in the enumeration sources are properly exported. This is necessary especially for the introspection builds on Visual Studio, as well as for the test programs. -For builds prior to Visual Studio 2013, we must include our math.h so that we can have a fallback implementation for round(), which is only provided in Visual Studio 2013 and later.
* testsuite: remove use of meson 0.50 argumentChristian Hergert2019-04-231-1/+0
|
* build: Port to the meson build systemMartin Blanchard2019-04-202-0/+77
| | | | | | | | This commit provides an initial port to the meson build system. See meson_options.txt for the changes to command line options. For a full build of GtkSourceView, the following will work. meson -Dglade_catalog=true -Dinstall_tests=true -Dgtk_doc=true build/
* testsuite: Fix a comparison which depended on GLib hash table orderingPhilip Withnall2019-03-111-10/+12
| | | | | | | | | | | | | In GLib 2.59, the iteration order of GHashTable was changed (its order has always be, and will always be, undefined). This has broken some comparisons in check_language() in test-language.c, which assumed a certain hash table ordering for the results returned by gtk_source_language_get_*(). Fix that by using an unordered comparison function. This should be backwards compatible with older GLib versions. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* License headers: do not have two consecutive blank linesSébastien Wilmet2017-09-244-4/+0
| | | | | | The previous commit removed the filenames, but didn't remove the line, since in most cases it wasn't necessary (and the diff --stat was clearer if it was the same for every file, i.e. only one line modified).
* License headers: remove filenamesSébastien Wilmet2017-09-2311-11/+11
| | | | | | | | | | | The LGPL doesn't require it. When renaming a file, we often forgot to update the filename. And when the namespace will be renamed, it'll be one less thing to care about. Done with this command (or a few other variants): $ sed -i 's/^ \* gtksource.*\.[ch]$/ */' *.[ch] and then by looking at the diff to see if it didn't remove something else.
* testsuite: write more unit tests for _gtk_source_iter_*()Sébastien Wilmet2017-04-231-0/+42
|
* iter: fix a bug in get_leading_spaces_end_boundary()Sébastien Wilmet2017-04-231-0/+40
| | | | | | | | | | | _gtk_source_iter_get_leading_spaces_end_boundary() moved to the following lines if the line at iter doesn't contain text, because g_unichar_isspace() returns TRUE for \n and \r too. But after a quick look at the code calling _gtk_source_iter_get_leading_spaces_end_boundary(), the bug didn't have an impact. It had an impact in Gtef, where I've copied the function and used it for another purpose.