aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/run-tests.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-14 00:08:03 -0500
committerCraig Jennings <c@cjennings.net>2026-06-14 00:08:03 -0500
commit623f8e09b93168c48f98961d963ce62a046b0877 (patch)
tree365878a3b411e430c480b20e7f1b95521535f9ef /scripts/theme-studio/run-tests.sh
parentd1edc63c205b7c589d4178bdd638b171400ed098 (diff)
downloaddotemacs-623f8e09b93168c48f98961d963ce62a046b0877.tar.gz
dotemacs-623f8e09b93168c48f98961d963ce62a046b0877.zip
Update theme studio palette workflow
Diffstat (limited to 'scripts/theme-studio/run-tests.sh')
-rwxr-xr-xscripts/theme-studio/run-tests.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/theme-studio/run-tests.sh b/scripts/theme-studio/run-tests.sh
index 4c4a5cde3..95a3dde68 100755
--- a/scripts/theme-studio/run-tests.sh
+++ b/scripts/theme-studio/run-tests.sh
@@ -44,8 +44,10 @@ else fail_msg "Node unit tests"; grep -E 'not ok|AssertionError|Error' /tmp/ts-n
# 4. Syntax-check the inlined page script.
python3 - <<'PY' && node --check /tmp/ts-script.js >/dev/null 2>&1 && pass_msg "spliced page <script> parses" || fail_msg "spliced page <script> syntax"
import re
-h = open('theme-studio.html').read()
-open('/tmp/ts-script.js', 'w').write(re.search(r'<script>(.*)</script>', h, re.S).group(1))
+with open('theme-studio.html') as src:
+ h = src.read()
+with open('/tmp/ts-script.js', 'w') as out:
+ out.write(re.search(r'<script>(.*)</script>', h, re.S).group(1))
PY
# 5. Browser hash gates.