Skip to content

Commit 6f8d9f8

Browse files
committed
test: count the Typst windows of the executed cell
1 parent e52d555 commit 6f8d9f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/run.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,11 +820,12 @@ if command -v Rscript >/dev/null 2>&1; then
820820
cell_windows="$({ grep -o '<div class="code-with-filename[" ]' "${work_dir}/empty-filename-cell.html" || true; } | wc -l | tr -d ' ')"
821821
render empty-filename-cell typst
822822
if [ "${cell_windows}" -eq 1 ] &&
823+
[ "$(count_typst_windows "${work_dir}/empty-filename-cell.typ")" -eq 1 ] &&
823824
grep -q '^#code-window(filename: "", is-auto: false' "${work_dir}/empty-filename-cell.typ"; then
824825
report pass "empty-filename-cell: a cell with an empty filename gets one window with an empty title"
825826
else
826827
report fail "empty-filename-cell: a cell with an empty filename gets one window with an empty title" \
827-
"one code-with-filename wrapper in HTML, got ${cell_windows}, and a #code-window(filename: \"\", is-auto: false call in Typst"
828+
"one code-with-filename wrapper in HTML, got ${cell_windows}, and one #code-window(filename: \"\", is-auto: false call in Typst"
828829
fi
829830
else
830831
report fail "empty-filename-cell: a cell with an empty filename gets one window with an empty title" \

0 commit comments

Comments
 (0)