summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Revert "listsnapshot: add snapshotting listmodel"Christian Hergert2022-11-182-161/+0
| | | | This reverts commit 2fce4e13d0cf6469684995c9e2a1c503e3cf889e.
* listsnapshot: add snapshotting listmodelChristian Hergert2022-11-162-0/+161
| | | | | | | This is a simple GListModel that attempts to snapshot a range of items in an underlying GListModel between calls to hold(pos,len) and release(). The goal here is to have list stability during a frame clock cycle regardless of what the underlying model is doing.
* testsuite/regex: fix coding styleChristian Hergert2022-09-291-180/+180
| | | | This wasn't translated to GtkSourceView style when imported.
* testsuite/regex: walk subject as utf8 unless G_REGEX_RAWChristian Hergert2022-09-291-8/+26
| | | | | | This makes sure that we walk strings which are expected as UTF-8 by characters so we don't split the multi-byte character. However, if G_REGEX_RAW is set, walk by byte.
* testsuite: use G_REGEX_RAW with invalid UTF-8Moody2022-09-291-1/+2
|
* testsuite: disable test-snippets for installed testsChristian Hergert2022-09-151-1/+1
| | | | | | | This requires on state within the testsuite directory, and therefore cannot be used for system installed tests. Fixes #291
* testsuite: mark some tests as not-installableChristian Hergert2022-09-061-5/+6
| | | | | | | Not all of these are intended to be used as installed tests, but rather to be used by CI to ensure that merge requests don't regress features. Fixes #288
* testsuite: use installed relaxng schema for installed testsChristian Hergert2022-09-051-10/+10
| | | | | | | | | If we are running out of tree, we still want to use languages and RelaxNG schema from the source tree. But if we do not have access to that, we can fallback to the installation prefix (which is now handled in GtkSourceLanguageManager). Fixes #287
* testsuite: include a mini def.lang for embedded resourcesChristian Hergert2022-09-053-0/+32
| | | | | That way we don't need to include paths for TOP_SRCDIR to get access to the def.lang styles.
* snippets: ensure final chunk is included in snippet outputChristian Hergert2022-07-221-0/+32
| | | | | | | We need to flush out any pending snippet text when parsing from strings or we risk loosing the final chunk. Fixes #252
* testsuite: check for NULL before usageChristian Hergert2022-07-221-3/+3
|
* testsuite: give language id on test failureChristian Hergert2022-06-241-4/+12
| | | | | | If we discover a language and expected NULL, it is handy to see what language failed from the CI runner so that we can easily point to it from merge requests.
* test-snippets.c: Fix build on Visual StudioChun-wei Fan2022-06-241-1/+3
| | | | | | | There is sadly no support for g_autoptr() on Visual Studio at this time. Hopefully things will change if Jussi's proposal gets accepted eventually[1]. [1]: https://developercommunity.visualstudio.com/t/add-support-for-gcc-like-cleanup-attribute-for-pla/1187001
* testsuite: reset vim regiseters between runsChristian Hergert2022-05-251-0/+5
| | | | | Now that we (more correctly) have vim registers shared between GtkSourceVim stacks, we need to reset them before each test case.
* testsuite: compare strv using set comparisonChristian Hergert2022-05-251-13/+40
| | | | | | | | The two strv should be compared in such a way that the complete set is in both strv but in any order and no more. Just a general set theory comparison of the two strv. Based on suggestion from Sébastien Wilmet on discourse.gnome.org.
* Revert "vim: make registers shared between views"Christian Hergert2022-05-191-3/+0
| | | | This reverts commit 83bd6880fc06775faa7131dd015fd83b0d5cb7c3.
* vim: make registers shared between viewsChristian Hergert2022-05-181-0/+3
| | | | | These need to be shared so that you can yank/paste between views without having to go to the system clipboard.
* testsuite: move test-snippets to testsuiteChristian Hergert2022-05-023-0/+165
| | | | | This should really be run on every commit and therefore belongs in the testsuite directory.
* languagemanager: add tests for search pathChristian Hergert2022-01-281-0/+38
|
* language: fix loading of references languages via resourcesChristian Hergert2022-01-274-4/+47
| | | | | | | This finishes the support for loading language files via resources and more thouroughly tests it. Fixes #253
* language: add support for gresourcesChristian Hergert2022-01-274-1/+77
| | | | | | | This allows you to specify a resource:///path/ to load language specs from without having to install them to the system. Fixes #253
* testsuite: dont use g_assert() in testsuiteChristian Hergert2022-01-092-4/+4
| | | | Related #43
* testsuite: use in-tree paths for style schemesChristian Hergert2022-01-081-0/+11
| | | | | | Avoid any side-effects from the system installation or user schemes. Fixes #244
* testsuite: set style scheme for highlightingChristian Hergert2022-01-061-0/+4
|
* scheme: cleanup naming and caching of current-line stateChristian Hergert2021-12-211-1/+1
| | | | | | We try to cache some of this information to make it faster for us to use from various parts of GtkSourceView at runtime. This cleans up the naming so it is significantly less confusing to read foreground vs background.
* vim: add test for filetypeChristian Hergert2021-11-271-0/+1
|
* vim: map textwidth/tw to right-margin-positionChristian Hergert2021-11-271-0/+1
|
* vim: implement o in visual modeChristian Hergert2021-11-271-0/+7
|
* vim: validate tabstop and shiftwidth valueChristian Hergert2021-11-241-0/+12
| | | | Fixes #237
* vim: avoid inclusivity unless selection is presentChristian Hergert2021-11-231-0/+2
| | | | | | This fixes a situation like 4I at position 0 due to inclusivity of the first-char motion. We only need to apply inclusivity when we are applying a change (which implies a selection motion).
* vim: fix test to match vimChristian Hergert2021-11-231-1/+1
|
* vim: add GtkSourceVimIMContextChristian Hergert2021-11-114-0/+552
| | | | | | | | | | | | | | | | | | | | | | | | This adds a new GtkIMContext implementation that attempts to emulate a modern Vim experience. It can be used with a GtkSourceView by connecting it to a GtkEventControllerKey and adding it to a view. This is an initial implementation and could use further work on matching semantics with Vim. However it has a number of features beyond what was implemented in GNOME Builder. Various features supported by GtkSourceVimIMContext include: - Normal, Insert, Replace, Visual, and Visual Line modes - Support for an integrated command bar and current command preview - Search and replace - Motions and Text Objects - History replay - Jumplists within the current file - Registers including the system and primary clipboards - Creation and motion to marks - Some commonly used Vim commands Fixes #233
* build: fix compilation warning for GIRChristian Hergert2021-11-041-1/+1
| | | | | We don't need to pass our deprecation flags to everything the project compiles as some of that is generated by meson and is out of our control.
* 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.