From a39f1e0f9b63833b2d34ae96e0aa176338e0a0c7 Mon Sep 17 00:00:00 2001 From: okezieuc <53785400+okezieuc@users.noreply.github.com> Date: Mon, 12 Oct 2020 15:26:10 +0100 Subject: [PATCH] added new syntax highlighting files I added a sample etc/hosts file and a sample requirements.txt file. I didn't know there was already a sample YAML file because it wasn't ticked in the issue so I added some extra syntax that I had in my own to the previous example.yaml file. --- tests/syntax-tests/highlighted/Hosts/hosts | 8 ++++++++ .../RequirementsTXT/requirements.txt | 8 ++++++++ .../syntax-tests/highlighted/YAML/example.yaml | 16 ++++++++++++++++ tests/syntax-tests/source/Hosts/hosts | 8 ++++++++ .../source/RequirementsTXT/requirements.txt | 8 ++++++++ tests/syntax-tests/source/YAML/example.yaml | 18 +++++++++++++++++- 6 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 tests/syntax-tests/highlighted/Hosts/hosts create mode 100644 tests/syntax-tests/highlighted/RequirementsTXT/requirements.txt create mode 100644 tests/syntax-tests/source/Hosts/hosts create mode 100644 tests/syntax-tests/source/RequirementsTXT/requirements.txt diff --git a/tests/syntax-tests/highlighted/Hosts/hosts b/tests/syntax-tests/highlighted/Hosts/hosts new file mode 100644 index 00000000..8d322f00 --- /dev/null +++ b/tests/syntax-tests/highlighted/Hosts/hosts @@ -0,0 +1,8 @@ +#this is a comment in the hosts file +127.0.0.1  localhost + +192.168.0.1 sample.test #a comment +192.160.0.200 try.sample.test try #another comment +216.58.223.238 google.com + +::1 localhost.try ip6-localhost diff --git a/tests/syntax-tests/highlighted/RequirementsTXT/requirements.txt b/tests/syntax-tests/highlighted/RequirementsTXT/requirements.txt new file mode 100644 index 00000000..b7c5155f --- /dev/null +++ b/tests/syntax-tests/highlighted/RequirementsTXT/requirements.txt @@ -0,0 +1,8 @@ +#this is a sample requirements.txt file + +django==11.2.0 +pywheels>=12.4 #a whitespace followed by comments +Nuitka<0.6.8.4 +wxPython>=1.0, <=2.1 + +#this is another comment diff --git a/tests/syntax-tests/highlighted/YAML/example.yaml b/tests/syntax-tests/highlighted/YAML/example.yaml index a6e2c00c..23e50275 100644 --- a/tests/syntax-tests/highlighted/YAML/example.yaml +++ b/tests/syntax-tests/highlighted/YAML/example.yaml @@ -4,6 +4,9 @@ name: Test User username: "testuser" other_names: ['Bob', 'Bill', 'George'] +hexa: 0x11c3 #inline comment +octa: 021131 +lastseen: .NAN enabled: true locked: false groups:  @@ -13,6 +16,19 @@ address: >  123 Alphabet Way  San Francisco, CA +bio: | + I am a hardworking person + and a member of the + executive staff phone: null +email: ~ building_access: yes secure_access: no +bulb: On +fans: Off +emails: + executives: + - bob@example.com + - bill@example.com + supervisors: + - george@example.com diff --git a/tests/syntax-tests/source/Hosts/hosts b/tests/syntax-tests/source/Hosts/hosts new file mode 100644 index 00000000..d7d4307d --- /dev/null +++ b/tests/syntax-tests/source/Hosts/hosts @@ -0,0 +1,8 @@ +#this is a comment in the hosts file +127.0.0.1 localhost + +192.168.0.1 sample.test #a comment +192.160.0.200 try.sample.test try #another comment +216.58.223.238 google.com + +::1 localhost.try ip6-localhost \ No newline at end of file diff --git a/tests/syntax-tests/source/RequirementsTXT/requirements.txt b/tests/syntax-tests/source/RequirementsTXT/requirements.txt new file mode 100644 index 00000000..83a41dc8 --- /dev/null +++ b/tests/syntax-tests/source/RequirementsTXT/requirements.txt @@ -0,0 +1,8 @@ +#this is a sample requirements.txt file + +django==11.2.0 +pywheels>=12.4 #a whitespace followed by comments +Nuitka<0.6.8.4 +wxPython>=1.0, <=2.1 + +#this is another comment \ No newline at end of file diff --git a/tests/syntax-tests/source/YAML/example.yaml b/tests/syntax-tests/source/YAML/example.yaml index cc2f63e4..1b215705 100644 --- a/tests/syntax-tests/source/YAML/example.yaml +++ b/tests/syntax-tests/source/YAML/example.yaml @@ -4,6 +4,9 @@ id: 3595 name: Test User username: "testuser" other_names: ['Bob', 'Bill', 'George'] +hexa: 0x11c3 #inline comment +octa: 021131 +lastseen: .NAN enabled: true locked: false groups: @@ -13,6 +16,19 @@ groups: address: > 123 Alphabet Way San Francisco, CA +bio: | + I am a hardworking person + and a member of the + executive staff phone: null +email: ~ building_access: yes -secure_access: no \ No newline at end of file +secure_access: no +bulb: On +fans: Off +emails: + executives: + - bob@example.com + - bill@example.com + supervisors: + - george@example.com \ No newline at end of file