summaryrefslogtreecommitdiffstats
path: root/tests/syntax-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/syntax-tests')
-rw-r--r--tests/syntax-tests/highlighted/D/test.d44
-rw-r--r--tests/syntax-tests/highlighted/EtcGroup/test.group67
-rw-r--r--tests/syntax-tests/highlighted/Git Attributes/example.gitattributes16
-rw-r--r--tests/syntax-tests/highlighted/Git Config/text.gitconfig107
-rw-r--r--tests/syntax-tests/highlighted/Graphviz DOT/test_digraph.dot41
-rw-r--r--tests/syntax-tests/highlighted/Graphviz DOT/test_graph.dot3
-rw-r--r--tests/syntax-tests/highlighted/MATLAB/test.matlab34
-rw-r--r--tests/syntax-tests/highlighted/Manpage/bat-0.16.man6
-rw-r--r--tests/syntax-tests/highlighted/Manpage/select-2.man98
-rw-r--r--tests/syntax-tests/highlighted/PowerShell/test.ps125
-rw-r--r--tests/syntax-tests/highlighted/QML/BatSyntaxTest.qml219
-rw-r--r--tests/syntax-tests/highlighted/SLS/test.sls57
-rw-r--r--tests/syntax-tests/highlighted/Svelte/App.svelte57
-rw-r--r--tests/syntax-tests/highlighted/Vue/example.vue55
-rw-r--r--tests/syntax-tests/highlighted/nginx/nginx.conf140
-rw-r--r--tests/syntax-tests/highlighted/nix/test.nix15
-rw-r--r--tests/syntax-tests/highlighted/orgmode/test.org38
-rw-r--r--tests/syntax-tests/source/D/test.d44
-rw-r--r--tests/syntax-tests/source/EtcGroup/test.group67
-rw-r--r--tests/syntax-tests/source/Git Attributes/example.gitattributes16
-rw-r--r--tests/syntax-tests/source/Git Config/LICENSE.md1
-rw-r--r--tests/syntax-tests/source/Git Config/text.gitconfig107
-rw-r--r--tests/syntax-tests/source/Graphviz DOT/LICENSE.md22
-rw-r--r--tests/syntax-tests/source/Graphviz DOT/test_digraph.dot41
-rw-r--r--tests/syntax-tests/source/Graphviz DOT/test_graph.dot3
-rw-r--r--tests/syntax-tests/source/MATLAB/LICENSE.md27
-rw-r--r--tests/syntax-tests/source/MATLAB/test.matlab34
-rwxr-xr-xtests/syntax-tests/source/PowerShell/test.ps1bin0 -> 1430 bytes
-rw-r--r--tests/syntax-tests/source/QML/BatSyntaxTest.qml219
-rw-r--r--tests/syntax-tests/source/SLS/test.sls57
-rw-r--r--tests/syntax-tests/source/Svelte/App.svelte57
-rw-r--r--tests/syntax-tests/source/Svelte/LICENSE14
-rw-r--r--tests/syntax-tests/source/Vue/example.vue55
-rw-r--r--tests/syntax-tests/source/nginx/nginx.conf140
-rw-r--r--tests/syntax-tests/source/nix/test.nix15
-rw-r--r--tests/syntax-tests/source/orgmode/test.org38
36 files changed, 1927 insertions, 52 deletions
diff --git a/tests/syntax-tests/highlighted/D/test.d b/tests/syntax-tests/highlighted/D/test.d
new file mode 100644
index 00000000..da347147
--- /dev/null
+++ b/tests/syntax-tests/highlighted/D/test.d
@@ -0,0 +1,44 @@
+// selective import
+import std.stdio : writeln, writefln;
+// non-selective import
+import std.algorithm;
+
+/* a multiline comment
+*
+* this function is safe because it doesn't use pointer arithmetic
+*/
+int the_ultimate_answer() @safe {
+ // assert1on
+ assert(1 != 2);
+ // now we can safely return our answer 
+ return 42;
+}
+
+void main()
+{
+ // function call with string literal
+ writeln("Hello World!");
+
+ // an int array declaration
+ int[] arr1 = [1, 2, 3];
+ // an immutable double
+ immutable double pi = 3.14;
+ // a mutable double
+ double d1 = pi;
+ // a pointer
+ double* dp1 = &d1;
+ // another pointer to the same thingy
+ auto a1 = &d1;
+ // a constant bool
+ const bool b1 = true;
+ if (b1) {
+ // another function call 
+ writefln("%s\n%s\n%s\n", arr1, d1, the_ultimate_answer());
+ }
+ else if (!b1) {
+ writeln("this seems wrong");
+ }
+ else {
+ writeln("I'm giving up, this is too crazy for me");
+ }
+}
diff --git a/tests/syntax-tests/highlighted/EtcGroup/test.group b/tests/syntax-tests/highlighted/EtcGroup/test.group
new file mode 100644
index 00000000..5049c80e
--- /dev/null
+++ b/tests/syntax-tests/highlighted/EtcGroup/test.group
@@ -0,0 +1,67 @@
+root:x:0:root
+sys:x:3:bin
+mem:x:8:
+ftp:x:11:
+mail:x:12:
+log:x:19:
+smmsp:x:25:
+proc:x:26:polkitd
+games:x:50:
+lock:x:54:
+network:x:90:
+floppy:x:94:
+scanner:x:96:
+power:x:98:
+adm:x:999:daemon
+wheel:x:998:username
+kmem:x:997:
+tty:x:5:
+utmp:x:996:
+audio:x:995:mpd,username
+disk:x:994:
+input:x:993:
+kvm:x:992:
+lp:x:991:
+optical:x:990:username
+render:x:989:
+storage:x:988:username
+uucp:x:987:
+video:x:986:username
+users:x:985:
+systemd-journal:x:984:
+rfkill:x:983:
+bin:x:1:daemon
+daemon:x:2:bin
+http:x:33:
+nobody:x:65534:
+dbus:x:81:
+systemd-journal-remote:x:982:
+systemd-network:x:981:
+systemd-resolve:x:980:
+systemd-timesync:x:979:
+systemd-coredump:x:978:
+uuidd:x:68:
+username:x:1000:
+git:x:977:
+avahi:x:976:
+colord:x:975:
+polkitd:x:102:
+mpd:x:45:
+rtkit:x:133:
+transmission:x:169:
+wireshark:x:150:username
+lightdm:x:974:
+geoclue:x:973:
+usbmux:x:140:
+dhcpcd:x:972:
+brlapi:x:971:
+gdm:x:120:
+libvirt:x:970:
+flatpak:x:969:
+gluster:x:968:
+rpc:x:32:
+tor:x:43:
+rslsync:x:967:
+docker:x:966:username
+sambashare:x:1002:username
+named:x:40:
diff --git a/tests/syntax-tests/highlighted/Git Attributes/example.gitattributes b/tests/syntax-tests/highlighted/Git Attributes/example.gitattributes
new file mode 100644
index 00000000..178bc759
--- /dev/null
+++ b/tests/syntax-tests/highlighted/Git Attributes/example.gitattributes
@@ -0,0 +1,16 @@
+#
+# Comment
+
+[attr]binary -diff -merge -text
+
+* text=auto
+*.c diff=c
+*.cc text diff=cpp
+*.o binary
+*.bat text eol=crlf
+*.lock text -diff
+*.*ignore text
+*.patch -text
+
+.gitattributes linguist-language=gitattributes
+.gitkeep export-ignore
diff --git a/tests/syntax-tests/highlighted/Git Config/text.gitconfig b/tests/syntax-tests/highlighted/Git Config/text.gitconfig
new file mode 100644
index 00000000..91f3b08c
--- /dev/null
+++ b/tests/syntax-tests/highlighted/Git Config/text.gitconfig
@@ -0,0 +1,107 @@
+[alias]
+ br = branch
+ branch = branch -a
+ c = clone --recursive
+ ci = commit
+ cl = clone
+ co = checkout
+ contributors = shortlog --summary --numbered
+ lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
+ remote = remote -v
+ st = status
+ tag = tag -l
+[apply]
+ whitespace = fix
+[color]
+ ui = true
+[color "branch"]
+ current = yellow
+ local = yellow
+ remote = green
+[color "diff"]
+ commit = yellow bold
+ frag = magenta bold
+ meta = yellow
+ new = green bold
+ old = red bold
+ whitespace = red reverse
+[color "diff-highlight"]
+ newHighlight = green bold 22
+ newNormal = green bold
+ oldHighlight = red bold 52
+ oldNormal = red bold
+[color "status"]
+ added = green
+ changed = yellow
+ untracked = cyan
+[commit]
+ gpgsign = true
+[core]
+ editor = /usr/bin/vim
+ # global exclude
+ excludesfile = /home/frank/.config/git/ignore
+ pager = delta
+ ; broken on old machines
+ untrackedCache = true
+[credential]
+ helper = store
+[delta]
+ features = line-numbers decorations
+ max-line-length = 1024
+ whitespace-error-style = 22 reverse
+[delta "decorations"]
+ commit-decoration-style = bold yellow box ul
+ file-decoration-style = none
+ file-style = bold yellow
+ syntax-theme = gruvbox
+[diff]
+ submodule = diff
+ algorithm = histogram
+ renames = copies
+[difftool]
+ prompt = false
+[difftool "wrapper"]
+ binary = true
+ cmd = git-difftool-wrapper \"$LOCAL\" \"$REMOTE\"
+[diff "pdfconv"]
+ textconv = pdftohtml -stdout
+[fetch]
+ negotiationAlgorithm = skipping
+ parallel = 0
+[help]
+ autocorrect = 1
+[index]
+ version = 4
+[interactive]
+ diffFilter = delta --color-only
+[merge]
+ log = true
+[protocol]
+ version = 2
+[pull]
+ rebase = true
+[push]
+ default = current
+ recurseSubmodules = on-demand
+[rebase]
+ autoStash = true
+[rerere]
+ autoUpdate = true
+ enabled = true
+[sequence]
+ editor = interactive-rebase-tool
+[submodule]
+ fetchJobs = 0
+[tag]
+ gpgSign = true
+ sort = -version:refname
+[url "git@gist.github.com:"]
+ insteadOf = gist:
+ pushInsteadOf = https://gist.github.com/
+[url "git@github.com:"]
+ insteadOf = gh:
+ pushInsteadOf = https://github.com/
+[user[38;