summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Update expected output for Ruby.Matthäus G. Chajdas2021-02-141-14/+7
| | |
* | | Cleanup test_ruby after merge.Matthäus G. Chajdas2021-02-141-132/+1
| | |
* | | Merge branch 'issue-253-ruby-unicode' of ↵Matthäus G. Chajdas2021-02-141-0/+185
|\ \ \ | |/ / |/| | | | | https://github.com/kurtmckee/pygments into kurtmckee-issue-253-ruby-unicode
| * | Support Ruby method names and operator overrides, including UnicodeKurt McKee2020-09-041-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #253 This patch contains these changes: * Add 50+ new Ruby tests for method name/operator override matching. * Unicode method names are now supported (#253). * `=` method name postfixes are now supported. * These operator overrides are now supported: `<`, `<=`, `!` `!@`, `~@`, `!`, `!=`, `!~`, `=~` * The `<>` "operator" override is removed. It appears that this was a typo in the regular expression (`<=?>` should have been `<=>?`). Syntax verified with https://docs.ruby-lang.org/en/2.7.0/syntax/methods_rdoc.html
* | | Update Fortran test file.Matthäus G. Chajdas2021-02-121-34/+17
| | | | | | | | | | | | We identify more keywords now thanks to #1677.
* | | Supports single quote strings in AutoItLexer (#1667)trdean12021-02-082-0/+13
| | | | | | | | | | | | | | | * Supports single quote strings in AutoItLexer * Adds test case for autoIt single strings
* | | Regenerate test files.Matthäus G. Chajdas2021-02-072-0/+2
| | | | | | | | | | | | This adds a newline and makes sure the files round-trip correctly.
* | | Update CHANGES, move graphviz test file.Matthäus G. Chajdas2021-02-072-0/+72
| | |
* | | Add lexer for graphviz (#1657)Niklas Mollenhauer2021-02-071-0/+12
| | | | | | | | | | | | | | | | | | | | | Imported from: https://github.com/nikeee/pygments-lexer-graphviz See: https://github.com/pygments/pygments/issues/731
* | | Improve Kotlin lexer (#1699)Ilya Zorin2021-02-069-116/+175
| | |
* | | Fix for lexing J operator ? (#1700)amitkummer2021-02-062-0/+17
| | | | | | | | | | | | | | | * Add J lexer tests for operator ? * Make J lexer match ? as an operator
* | | Support anchored line numbers in inline mode (#1591)Kevin Deldycke2021-02-0616-48/+48
| | | | | | | | | | | | | | | * Add support for anchored line numbers in inline rendering mode * Fix tests rendering anchored line number in inline mode
* | | MATLAB parser cleanup & fix for parsing `1./x` (#1673)Antony Lee2021-02-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Clarify recognition of "command form" by MATLAB parser. Expand a bit the explanation; remove an unnecessary non-capturing group, replace \s+ by \s at the end (we just need to check for the presence of a space). * MATLAB: Correctly parse 1./x as (1)(./)(x).
* | | Fix #1046.Matthäus G. Chajdas2021-02-061-0/+21
| | | | | | | | | | | | LESS lexer didn't handle single-line comments.
* | | Merge branch 'master' of https://github.com/mathiasertl/pygments into ↵Matthäus G. Chajdas2021-01-307-8/+54
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mathiasertl-master Resolve conflicts, move tests to snippets, regenerate example files. # Conflicts: # tests/test_shell.py
| * | | add another test caseMathias Ertl2021-01-101-0/+17
| | | |
| * | | only print PS2 prompt if backslash continuation is enabledMathias Ertl2021-01-101-5/+20
| | | |
| * | | make PS2 contain a spaceMathias Ertl2021-01-101-0/+13
| | | |
* | | | Add expected output for the AMDGPU example.Matthäus G. Chajdas2021-01-302-0/+130
| | | |
* | | | AMDGPU ISA Lexer (#1626)Thomas Symalla2021-01-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This commit implements a basic lexer for the AMDGPU ISA definition. * Updated comment. * Updated comment. * Tried to fix case-sensitive issue. * Updated AUTHORS file. * Added shader unit test for the AMD ISA Parser. * Renamed AMDGCN lexer to AMDGPU. * Renamed example file. * Renames. Co-authored-by: Thomas Symalla <root@SEUCHOMAT.localdomain>
* | | | cmdline: port to argparse (#1693)Georg Brandl2021-01-301-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmdline: port to argparse * cmdline: adapt the argparse help formatter to actually take terminal width into account * Update based on review feedback. * Extract "is_only_option" method * Check -L argument to be a "known good" argument Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
* | | | Fix mishandling '*/' in C/C++ and related (fixes #1695)Georg Brandl2021-01-291-0/+31
| | | |
* | | | increase allowed time for "expensive" checks, pypy is slowGeorg Brandl2021-01-291-4/+6
| | | |
* | | | conftest: disallow error tokens in examplefilesGeorg Brandl2021-01-219-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | They are ok in small snippets to demonstrate error cases. Also recode all examplefiles to UTF-8.
* | | | Rename "tests/lexers" to "tests/snippets" and update the contributionGeorg Brandl2021-01-20320-2/+2
| | | | | | | | | | | | | | | | docs to point to both snippets and examplefiles.
* | | | tests: code style fixupsGeorg Brandl2021-01-2014-119/+129
| | | |
* | | | Also add auto-updatable output-based tests to examplefiles (#1689)Oleh Prypin2021-01-20958-2947/+1089467
| | | | | | | | | | | | Co-authored-by: Georg Brandl <georg@python.org>
* | | | Replace tests that assert on token output with auto-updatable samples (#1649)Oleh Prypin2021-01-18362-7329/+7726
| | | |
* | | | Matlab class properties (#1466)Dan2021-01-181-34/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Add failing test for a matlab class with properties. * Add some missing keywords * Add leading \s* matchers to things above the command form regex, as it tends to swallow keywords otherwise. * Add support for the special 'properties' block syntax. * Fix apparent infinite loop when given garbage input. * Use includes to clean up some of my copypasta. * Fix negative lookahead when there's more than one space between operators. * Use Whitespace not Text for spaces; combine adjacent whitespace. * Add support for declarative property constraints.
* | | | Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-1767-85/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* | | | Fix for lexing Python raw f-strings with backslashes (#1683)Jeppe Dakin2021-01-171-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * introduce and apply rfstringescape * add unit test for raw f-strings * add further tests * fix comment
* | | | Added `pygmentize -C` option to guess a lexer from contentGeorg Brandl2021-01-171-0/+7
| | | |
* | | | Do not guess MIME or SQL without reasonGeorg Brandl2021-01-171-1/+0
| | | | | | | | | | | | | | | | constant returns from analyse_text are not useful.
* | | | fix coding style in test_analyzer_lexerGeorg Brandl2021-01-111-22/+31
|/ / /
* | | Detect malformed closing tags as errors. (#1656)Catatonic2021-01-061-0/+33
| | |
* | | Fix #1582 -- invalid comment in Matlab example.Matthäus G. Chajdas2021-01-061-1/+1
| | |
* | | Markdown lexer improvements (#1623)Leistungsabfall2021-01-061-30/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | * improve fenced code recognition for markdown lexer * improve inline code detection * improve detection of some Markdown keywords * remove Markdown recognition of code indented by 4 spaces as reliable detection is not possible with regex
* | | support indented entries in IniLexer (#1624)Leistungsabfall2021-01-041-0/+81
| | |
* | | Update Crystal lexer (#1650)Oleh Prypin2021-01-042-16/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * crystal: drop all classes from builtins; these aren't normally highlighted ("normally" meaning all other highlighter tools) * crystal: fix percent-strings, drop Ruby-specific arbitrary delimiters It seems that Ruby supports strings such as `%*text*` where `*` can be anything. But Crystal never had anything like that. It does, however, keep `%|text|`, so add a case for that. * crystal: update keywords and builtins * crystal: fix string literals and escape sequences Update list of escapes. Support Unicode escape sequences. Also remove the Ruby-specific `:@foo` symbol syntax, Crystal doesn't have it. * crystal: uppercase identifiers aren't always constants Make `FOO::Bar` be highlighted like `Foo::Bar` would be, rather than like `FOO` * crystal: annotations can be namespaced Highlight the entire inside part of `@[Foo::Bar]`, not just the `Foo` part (these used to be named 'attributes' but the official name is 'annotations' now, so I also change that) * fixup! crystal: fix percent-strings, drop Ruby-specific arbitrary delimiters
* | | Fix Coq-related bug #678 (#1648)Maximilian Wuttke2021-01-041-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Unicode support for Coq Catch-all lexing for `Name.Builtin.Pseudo`, as in the lean lexer. This fixes #678. * Coq lexer: improve `analyse_text` * Add a test for Coq
* | | Merge branch 'master' of https://github.com/felixhao28/pygments into ↵Matthäus G. Chajdas2021-01-041-2/+24
|\ \ \ | | | | | | | | | | | | felixhao28-master
| * | | Update tests/test_javascript.pyFelix Hao2021-01-041-1/+1
| | | | | | | | | | | | Co-authored-by: Mestery <48163546+Mesteery@users.noreply.github.com>
| * | | add test_function_definitionYiyang Hao2020-08-241-1/+23
| | | |
* | | | Bump copyright year.Matthäus G. Chajdas2021-01-0357-57/+57
| | | |
* | | | Merge github.com:mathiasertl/pygmentsGeorg Brandl2020-12-281-4/+25
|\ \ \ \ | | | | | | | | | | | | | | | fixes #1645
| * | | | add tests to illustrate problem discussed in PR #1645Mathias Ertl2020-12-261-0/+25
| | | | |
| * | | | consider trailing whitespace a part of the prompt, making copy/paste more ↵Mathias Ertl2020-12-251-5/+3
| | | | | | | | | | | | | | | | | | | | straight forward
* | | | | do_insertions: do not emit empty tokensGeorg Brandl2020-12-283-19/+4
|/ / / /
* | | | Restore timing stats in test_examplefiles, and cut down USD file.Georg Brandl2020-12-252-56/+16
| | | |
* | | | all: weed out more backtracking string regexesGeorg Brandl2020-12-251-3/+1
| | | |