chore(tests): consistent captures

This commit is contained in:
Christian Clason 2023-12-24 12:52:21 +01:00
parent 17fae3f4a3
commit 10dd49958c
60 changed files with 872 additions and 873 deletions

View file

@ -1,2 +1,2 @@
#define FOO(X,Y) X + Y
// ^ cuda
// ^ @cuda

View file

@ -1,6 +1,6 @@
FROM foo
RUN bar
# ^ bash
# ^ @bash
RUN \
baz
# ^ bash
# ^ @bash

View file

@ -1,9 +1,9 @@
html`<p></p>`;
// ^ html
// ^ @html
html(`<p></p>`);
// ^ html
// ^ @html
svg`<p></p>`;
// ^ html
// ^ @html
svg(`<p></p>`);
// ^ html
// ^ @html

View file

@ -6,50 +6,50 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet">
<style> footer{ } </style>
<!-- ^ css -->
<!-- ^ @css -->
<style title="Test Style without type attribute"> footer{ } </style>
<!-- ^ css -->
<!-- ^ @css -->
<style type="text/css" title="test style with defined type attribute"> footer{ } </style>
<!-- ^ css -->
<!-- ^ @css -->
</head>
<body>
<script> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script defer> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script async defer> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script type="text/javascript"> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script type="text/ecmascript"> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script type="application/ecmascript"> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script type="application/javascript"> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script type="module"> import { foo } from "bar" </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script defer type="text/javascript"> const x = 1 </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script type="text/markdown">## Hello *World*!</script>
<!-- ^ markdown -->
<!-- ^ @markdown -->
<script type="application/graphql">query OK { dokey }</script>
<!-- ^ graphql -->
<!-- ^ @graphql -->
<script type="application/typescript">type A = number;</script>
<!-- ^ typescript -->
<!-- ^ @typescript -->
<script type="application/json">{ "true": false }</script>
<!-- ^ json -->
<!-- ^ @json -->
<script type="importmap">{ "true": false }</script>
<!-- ^ json -->
<!-- ^ @json -->
<div style="height: 100%">
<!-- ^ css -->
<!-- ^ @css -->
Test div to test css injections for style attributes
</div>
<input pattern="[0-9]+">
<!-- ^ regex -->
<!-- ^ @regex -->
<input pattern=[0-9]+ type="tel">
<!-- ^ regex -->
<!-- ^ @regex -->
</body>
</html>

View file

@ -1,23 +1,21 @@
<script> import Button from "./Button.svelte"; </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script lang="ts"> const foo: number = 1 </script>
<!-- ^ typescript -->
<!-- ^ !javascript -->
<!-- ^ @typescript -->
<!-- ^ @!javascript -->
<style> main { font-family: sans-serif; text-align: center; } </style>
<!-- ^ css -->
<!-- ^ @css -->
<style lang="scss"> main { &:hover { } } </style>
<!-- ^ scss -->
<!-- ^ !css -->
<!-- ^ @scss -->
<!-- ^ @!css -->
<main>
<h1>Test file</h1>
{#each someItems as someItem}
<!-- ^ javascript
-->
<!-- ^ @javascript -->
<div>{someItem}</div>
<!-- ^ javascript
-->
<!-- ^ @javascript -->
{/each}
<Button />
<button on:click={() => foo++}></button>

View file

@ -1,4 +1,4 @@
<script lang="ts"> const foo: number = "1" </script>
<!-- ^ !javascript -->
<!-- ^ @!javascript -->
<style lang="scss"> .bar { &-baz { &.page{ } } } </style>
<!-- ^ !css -->
<!-- ^ @!css -->

View file

@ -1,38 +1,39 @@
<template>
<span>{{"Text inside interpolation"}}</span>
<!-- ^ typescript -->
<!-- ^ @typescript -->
<template lang="pug"> a(:href="url") some link title in pug: </template>
<!-- ^ pug -->
<!-- ^ @pug -->
<template v-if="'text inside directives'"></template>
<!-- ^ typescript -->
<!-- ^ @typescript -->
</template>
<script> const foo = "1" </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script defer> const foo = "1" </script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script lang="js">function x(){ return 1;}</script>
<!-- ^ javascript -->
<!-- ^ @javascript -->
<script lang="ts"> const foo: number = "1" </script>
<!-- ^ typescript -->
<!-- ^ !javascript -->
<!-- ^ @typescript -->
<!-- ^ @!javascript -->
<script lang="ts" defer>const foo: number = 1 </script>
<!-- ^ typescript -->
<!-- ^ !javascript -->
<!-- ^ @typescript -->
<!-- ^ @!javascript -->
<script lang="tsx" defer>const foo: number = 1</script>
<!-- ^ tsx -->
<!-- ^ !jsx -->
<!-- ^ !typescript -->
<!-- ^ @tsx -->
<!-- ^ @!jsx -->
<!-- ^ @!typescript -->
<style> .bar { .foo{ } } </style>
<!-- ^ css -->
<!-- ^ @css -->
<style scoped> .page.page--news { background: rebeccapurple; } </style>
<!-- ^ css -->
<!-- ^ @css -->
<style lang="css"> .bar { justify-content: center; } </style>
<!-- ^ css -->
<!-- ^ @css -->
<style lang="scss"> .bar { &-baz { } } </style>
<!-- ^ scss -->
<!-- ^ !css -->
<!-- ^ @scss -->
<!-- ^ @!css -->
<style scoped lang="scss">body{} </style>
<!-- ^ scss -->
<!-- ^ !css -->
<!-- ^ @scss -->
<!-- ^ @!css -->
// const file = files[0];

View file

@ -14,10 +14,10 @@ jobs:
node-version: '16'
- name: Install dependencies
run: npm ci
# ^ bash
# ^ @bash
- name: Run tests
run: npm test
# ^ bash
# ^ @bash
- name: Parse Petalisp
run: |
git submodule init
@ -27,6 +27,6 @@ jobs:
else
echo "Successfully parsed Petalisp"
fi
# ^ bash
# ^ @bash
- name: Run tests
run: npm test

View file

@ -3,7 +3,7 @@ groups:
rules:
- alert: Node down
expr: up{job="node_exporter"} == 0
# ^ promql
# ^ @promql
for: 3m
labels:
severity: warning
@ -13,7 +13,7 @@ groups:
- alert: Node down
expr: |
up{job="node_exporter"} == 0
# ^ promql
# ^ @promql
for: 3m
labels:
severity: warning