| # SYNTAX TEST "source.upstart" "upstart syntax highlighting" | |
| # Copyright 2022 The ChromiumOS Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| # See https://github.com/PanAeon/vscode-tmgrammar-test for details | |
| # To run this test: | |
| # 1. install vscode-tmgrammar-test CLI tool | |
| # 2. cd languages | |
| # 3. vscode-tmgrammar-test -g upstart.tmLanguage.json upstart-syntax-test.conf | |
| # It will complain about not having 'source.shell', but that's alright. | |
| # This will be highlighted. | |
| export SHUTDOWN_REASON | |
| # <------ keyword.other.export.upstart | |
| # ^^^^^^^^^^^^^^^ variable.upstart | |
| # No highlighting without the variable | |
| export | |
| # <------ - keyword.other.export.upstart | |
| # `env KEY` is highlighted | |
| env mykey | |
| # <--- keyword.other.env.upstart | |
| # ^^^^^ variable.upstart | |
| # `env KEY=VALUE` is highlighted | |
| env mykey=myvalue | |
| # <--- keyword.other.env.upstart | |
| # ^^^^^ variable.upstart | |
| # ^ keyword.operator.equals.upstart | |
| # ^^^^^^^ string.upstart | |
| # no highlighting | |
| env mykey= | |
| # <--- - keyword.other.env.upstart | |
| expect daemon | |
| # <------------- keyword.other.expect.upstart | |
| # No highlighting on incomplete stanza | |
| expect | |
| # <------ - keyword.other.expect.upstart | |
| kill signal 15 | |
| # <----------- keyword.other.kill-reload.upstart | |
| # ^^ constant.numeric.upstart | |
| reload signal SIGINT | |
| # <------------- keyword.other.kill-reload.upstart | |
| # ^^^^^^ constant.language.signal.upstart | |
| # "SIG" prefix is not required | |
| reload signal HUP | |
| # <------------- keyword.other.kill-reload.upstart | |
| # ^^^ constant.language.signal.upstart | |
| # incorrect signal names are not highlighted | |
| reload signal INTTT | |
| # ^^^^^ - constant.language.signal.upstart | |
| kill timeout 20 | |
| # <------------ keyword.other.kill-timeout.upstart | |
| # ^^ constant.numeric.upstart | |
| description "Start service" | |
| # <----------- keyword.other.documentation.upstart | |
| # ^^^^^^^^^^^^^^^ string.quoted.double.upstart | |
| author "chromium-os-dev@chromium.org" | |
| # <------ keyword.other.documentation.upstart | |
| # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.upstart | |
| emits *-device-* hello | |
| # <----- keyword.other.emits.upstart | |
| # ^^^^^^^^^^ string.unquoted.event.upstart | |
| # ^^^^^ string.unquoted.event.upstart | |
| start on started boot-complete and starting boot_services | |
| # <-------- keyword.other.event-definition.upstart | |
| # ^^^^^^^ keyword.operator.modifier.upstart | |
| # ^^^^^^^^^^^^^ entity.name.function.event.upstart | |
| # ^^^ keyword.operator.logical.upstart | |
| # ^^^^^^^ keyword.operator.modifier.upstart | |
| # ^^^^^^^^^^^^ entity.name.function.event.upstart | |
| task | |
| # <---- keyword.other.task-respawn.upstart | |
| normal exit 0 13 SIGUSR1 WINCH | |
| # <-----------keyword.other.normal-exit.upstart | |
| # ^ constant.numeric.upstart | |
| # ^^ constant.numeric.upstart | |
| # ^^^^^^^ constant.language.signal.upstart | |
| # ^^^^^ constant.language.signal.upstart | |
| respawn limit 10 5 | |
| # <------------- keyword.other.respawn-limit.upstart | |
| # ^^ constant.numeric.upstart | |
| # ^ constant.numeric.upstart | |
| respawn limit unlimited | |
| # <------------- keyword.other.respawn-limit.upstart | |
| # ^^^^^^^^^ constant.language.unlimited.upstart | |
| console none | |
| # <------------ keyword.other.console.upstart | |
| limit as 30000000 unlimited | |
| # <----- keyword.other.limit.upstart | |
| # ^^ entity.name.other.resource.upstart | |
| # ^^^^^^^^ constant.numeric.upstart | |
| # ^^^^^^^^^ constant.language.unlimited.upstart | |
| nice 10 | |
| # <---- keyword.other.nice.upstart | |
| # ^^ constant.numeric.upstart | |
| oom score never | |
| # <--------- keyword.other.oom-score.upstart | |
| # ^^^^^ constant.language.never.upstart | |
| oom score -100 | |
| # <--------- keyword.other.oom-score.upstart | |
| # ^^^^ constant.numeric.upstart | |
| umask | |
| # <----- keyword.other.umask.upstart | |
| instance $NAME | |
| # <-------- keyword.other.instance.upstart | |
| # ^^^^^ variable.other.instance.upstart | |
| instance ${NAME} | |
| # <-------- keyword.other.instance.upstart | |
| # ^^^^^^^ variable.other.instance.upstart | |
| # dollar sign is mandatory, no highlighting without it | |
| instance NAME | |
| # <-------- - keyword.other.instance.upstart | |
| # ^^^^ - variable.other.instance.upstart | |
| import VAR_NAME | |
| # <------ keyword.other.import.upstart | |
| # ^^^^^^^^ variable.upstart | |
| # No dollar sign, so no highligting. | |
| import $VAR | |
| # <------ - keyword.other.import.upstart | |
| # ^^^^ - variable.upstart | |
| tmpfiles /usr/lib/tmpfiles.d/some.conf | |
| # <-------- keyword.other.tmpfiles.upstart | |
| # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted.tmpfiles.upstart | |
| tmpfiles /usr/some.conf /another.conf | |
| # <-------- keyword.other.tmpfiles.upstart | |
| # ^^^^^^^^^^^^^^ string.unquoted.tmpfiles.upstart | |
| # ^^^^^^^^^^^^^ string.unquoted.tmpfiles.upstart | |
| # Don't highlight strings not starting with a slash. | |
| tmpfiles no-leading-slash | |
| # ^^^^^^^^^^^^^^^^ - string.unquoted.tmpfiles.upstart |