summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/test-helper/README.md4
-rw-r--r--tools/test-helper/package.json3
-rw-r--r--tools/test-helper/src/extension.ts4
3 files changed, 5 insertions, 6 deletions
diff --git a/tools/test-helper/README.md b/tools/test-helper/README.md
index 6eab6abd..3ecc1d4f 100644
--- a/tools/test-helper/README.md
+++ b/tools/test-helper/README.md
@@ -6,7 +6,7 @@ Code Lens buttons will appear above every test's name:
- View: Opens the output and reference image of a test to the side.
- Run: Runs the test and shows the results to the side.
-- Save: Runs the test with `--update` to save the reference image.
+- Save: Runs the test with `--update` to save the reference output.
- Terminal: Runs the test in the integrated terminal.
In the side panel opened by the Code Lens buttons, there are a few menu buttons
@@ -14,7 +14,7 @@ at the top right:
- Refresh: Reloads the panel to reflect changes to the images.
- Run: Runs the test and shows the results.
-- Save: Runs the test with `--update` to save the reference image.
+- Save: Runs the test with `--update` to save the reference output.
## Installation
In order for VS Code to run the extension with its built-in
diff --git a/tools/test-helper/package.json b/tools/test-helper/package.json
index de919ef3..d34213fb 100644
--- a/tools/test-helper/package.json
+++ b/tools/test-helper/package.json
@@ -28,7 +28,7 @@
},
{
"command": "typst-test-helper.saveFromPreview",
- "title": "Run and save reference image",
+ "title": "Run and save reference output",
"category": "Typst Test Helper",
"icon": "$(save)",
"enablement": "typst-test-helper.runButtonEnabled"
@@ -102,4 +102,3 @@
"vscode": "^1.88.0"
}
}
-
diff --git a/tools/test-helper/src/extension.ts b/tools/test-helper/src/extension.ts
index 1f2cbd26..2e2b7d21 100644
--- a/tools/test-helper/src/extension.ts
+++ b/tools/test-helper/src/extension.ts
@@ -121,7 +121,7 @@ class TestHelper {
const lenses = [];
for (let nr = 0; nr < document.lineCount; nr++) {
const line = document.lineAt(nr);
- const re = /^--- ([\d\w-]+) ---$/;
+ const re = /^--- ([\d\w-]+)( [\d\w-]+)* ---$/;
const m = line.text.match(re);
if (!m) {
continue;
@@ -143,7 +143,7 @@ class TestHelper {
}),
new vscode.CodeLens(line.range, {
title: "Save",
- tooltip: "Run and view the test and save the reference image",
+ tooltip: "Run and view the test and save the reference output",
command: "typst-test-helper.saveFromLens",
arguments: [name],
}),