Commit Graph

294 Commits

Author SHA1 Message Date
Niklas Mohrin ace655e164 Add integration tests for clircle cycle detection 2021-01-05 18:21:16 +01:00
Ethan P 1b549ecc66
Merge branch 'master' into improved-benchmark 2021-01-02 21:35:58 -08:00
sharkdp b5bdba8b16 Svelte syntax test: rename license file 2021-01-02 22:34:15 +01:00
sharkdp 522c97f5ad DotEnv syntax test: add missing newline 2021-01-02 22:34:15 +01:00
sharkdp b3f34529b5 Update Zig syntax test output 2021-01-02 21:34:25 +01:00
Paul Smith c76e27851c Add support for Zig
Adds syntax support for source code for the Zig programming
language. https://ziglang.org/
2021-01-02 21:34:25 +01:00
Julian Berman af8a8035e8 Add a Lean highlighting test file. 2021-01-02 09:45:19 +01:00
Ethan P 3ed0081f1f
Improve benchmark script to support cargo/config target-dir 2020-12-29 15:07:22 -08:00
Ensar Sarajčić 29ea396c31 Improve VimL regex highlighting
**NOTES:**
- PR is not yet merged in upstream repository (https://github.com/SalGnt/Sublime-VimL/pull/12),
but sublime-syntax file is already updated with changes.
- Updated syntax test files are added as well

This fixes #1064
2020-12-28 09:33:32 +01:00
Ensar Sarajčić 171d215f91 Add case from #1604 to VimL syntax-test source 2020-12-28 09:33:32 +01:00
Ensar Sarajčić cc6109a751 Add syntax highlighting tests for VimL
Adds a syntax highlighting test for VimL
with source file based on parts of my own configuration
changed to cover as much of syntax as possible.

**NOTES:**
Last line of source (`syntax enable`) does not get highlighted,
since `syntax` keyword is not part of highlighting rules.

Related to #1213
2020-12-28 09:33:32 +01:00
John Meow 3d07dec8fd Use Briles/gruvbox .tmTheme files instead of peaceant's port 2020-12-21 21:52:04 +01:00
Martin Nordholts a63bb08eda Add test 'grid_for_file_without_newline' (for issue #299 fix)
This is a regression test for the fix for issue #299. If that fix is
reverted, currently only one test ('header_padding') fails. But that
test is for a different use case, so add a dedicated regression test for
the particular use case issue #299 is about.
2020-12-21 21:45:34 +01:00
sharkdp e0207f8167 Fix test 2020-12-21 17:05:10 +01:00
David Peter cc7b89faf8
Merge pull request #1440 from Enselic/fix-1438-newline-can-be-added-even-if-style-plain
Don't add artificial newline to last line if --style=plain
2020-12-21 09:24:26 +01:00
VeryTastyTomato 973ea984c8 fix: warnings of ShellCheck
SC2155: Declare and assign separately to avoid masking return values.
SC2164: Use cd ... || exit in case cd fails.
SC2230: which is non-standard. Use builtin 'command -v' instead.
2020-12-21 09:08:54 +01:00
sharkdp 3e9afe2974 Add integration test for nonexisting newline 2020-12-21 08:34:22 +01:00
David Peter 73c16574e6
Merge branch 'master' into fix-1438-newline-can-be-added-even-if-style-plain 2020-12-21 08:22:01 +01:00
Martin Nordholts 60e00d49a9
Fix #1443 macOS: regression_test.sh: mktemp: illegal option (#1444)
The macOS version of mktemp does not recognize the --suffix option.
Using pure -d should work since, it seems [1], macOS 10.11 however.

So to make the script work on macOS, stop using the --suffix option.

The downside is of course that the temporary dir will have an anonymous
name, but I see no risk of confusion given how short-lived the usage of
the dir is, and given the context it is used.

[1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
2020-12-21 08:16:49 +01:00
Martin Nordholts 68d525cd8b Don't add artificial newline to last line if --style=plain
This fixes #1438.

Note however, that using a pager such as less will add a newline itself.
So to actually not print a newline for such files, you need to either
disable paging:

  bat --style=plain --paging=never no-newline-at-end-of-file.txt

or use a "pager" that does not add a newline:

  bat --style=plain --pager=cat no-newline-at-end-of-file.txt

Note that we also update syntax tests file since a bunch of them had
missing newlines on the last lines.
2020-12-19 10:32:50 +01:00
sharkdp bd2e9917da Revert "Add cycle detection integration tests"
This reverts commit ec60d84265.
2020-11-24 21:40:11 +01:00
henil 591eba66a3 add new syntax test files 2020-11-23 15:43:58 +01:00
Niklas Mohrin 4f0116bee7 Add cycle detection integration tests 2020-11-23 14:06:54 +01:00
Byron Alley 3dc5fc54df Import syntax regression test for Ruby Haml 2020-11-01 09:46:54 +01:00
Byron Alley bac84b4c8b Add sshd_config syntax highlighting test 2020-11-01 09:38:03 +01:00
Ethan P 61f947a580
Merge pull request #1276 from tommilligan/style-rule
style: add component 'rule' for horizontal file delimiter
2020-10-31 23:14:00 -07:00
David Peter 3a612f063e
Merge branch 'master' into master 2020-10-30 19:36:27 +01:00
Ján Priner 9daea73bba Add Ninja highlight test 2020-10-30 19:14:51 +01:00
Adrian Rivera 9837948c3a Throws an error when `bat` is being user as pager.
As mentioned on #1334 `bat` should not be used as a value for `pager`,
this change checks both the balue of `bat` provided as a parameter or
as an environment variable.
2020-10-29 19:33:58 +01:00
Kyle Hubert 072fb380d8
Add Svelte as a syntax 2020-10-29 19:33:09 +01:00
Horki cc6cf48256 1213: org mode highlight testing 2020-10-29 19:21:46 +01:00
Horki e571cb553b 1213: nix; added trailing new line 2020-10-25 21:03:30 +01:00
Horki bf9f6e872d 1312: nix; fixed src 2020-10-25 21:03:30 +01:00
Horki 8348c1b746 1213: nix; fix buildInputs arr 2020-10-25 21:03:30 +01:00
Horki 0a9744ac95 add nix highligh 2020-10-25 21:03:30 +01:00
sharkdp 9dd807344c Ignore 'all_themes_are_present' unit test by default 2020-10-25 08:18:55 +01:00
Armand Philippot 2ecebf8ff2 Add Coldark themes to unit test 2020-10-25 08:18:55 +01:00
Dobe Peter ec8072d51f Add PowerShell syntax test
Part of the work for issue #1213.

A short PowerShell script and the corresponding syntax-highlighted output
has been added. The script exhibits many of the peculiarities of the
PowerShell syntax.
2020-10-25 08:04:27 +01:00
Stefano Probst 7a7bb80e23 Add Git Config syntax test file
cc sharkdp/bat#1213
2020-10-24 14:45:54 +02:00
Alan Berndt 99ac5c3045 Add fairly complex nginx config.
This is to contribute to issue #1213.  I took some of the more
complicated servers I am running as examples.  Everything looks to be
correctly highlighted compared to vim's syntax highlighting.
2020-10-24 14:10:51 +02:00
R1tschY efab00a9de Add Git Attributes syntax test 2020-10-24 14:09:52 +02:00
Keith Hall cfdb853ea6 End highlighting of C code in man pages when no longer relevant 2020-10-24 12:30:25 +02:00
Keith Hall 41e857ea16 Highlight C code in all man pages sections 2020-10-24 12:30:25 +02:00
Frank Schmitt 5b2da2b08d #1213 expanded D test file 2020-10-24 12:28:15 +02:00
Frank Schmitt 5e0a608ea6 #1213 added very basic test file for D 2020-10-24 12:28:15 +02:00
R1tschY 3729aefb6f Add QML syntax test 2020-10-24 12:27:16 +02:00
henil 8a2122b4a4 Add test file for `/etc/group` 2020-10-24 12:26:41 +02:00
Tommaso Pifferi cc6f6fdb1d Add tests for Vue component syntax 2020-10-24 12:25:55 +02:00
Stefano Probst 5ec4936a4f Add Graphviz DOT example files
cc sharkdp/bat#1213
2020-10-24 12:25:09 +02:00
Stefano Probst be84682bcb Add MATLAB syntax test file
cc sharkdp/bat#1213
2020-10-24 12:22:46 +02:00