Skip to content

Commit

Permalink
Merge pull request #14 from Witiko/fix/missing-space-before-end
Browse files Browse the repository at this point in the history
Test sandboxing and chunks that end with `end` or comment
  • Loading branch information
Witiko committed Jul 31, 2022
2 parents be8723a + 029271f commit 1542705
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ jobs:
- name: Extract text of the example document
run: pdftotext example.pdf
- name: Check the text of the example document
run: grep '1+2=3' example.txt
run: |
set -e
cat example.txt
grep -q '1+2=3' example.txt
prerelease:
name: Prerelease the package
needs:
Expand Down
3 changes: 2 additions & 1 deletion example.context
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\usemodule[t][lt3luabridge]
\luabridgeExecute{x = 1 -- this will have no effect due to sandboxing}
\starttext
$ 1 + 2 = \luabridgeExecute{ print(1 + 2) } $
$ 1 + 2 = \luabridgeExecute{if true then print(1 + 2) end} $
\stoptext
3 changes: 2 additions & 1 deletion example.latex
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\documentclass{standalone}
\usepackage{lt3luabridge}
\luabridgeExecute{x = 1 -- this will have no effect due to sandboxing}
\begin{document}
$ 1 + 2 = \luabridgeExecute{ print(1 + 2) } $
$ 1 + 2 = \luabridgeExecute{if true then print(1 + 2) end} $
\end{document}
3 changes: 2 additions & 1 deletion example.plaintex
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
\input lt3luabridge\relax
$ 1 + 2 = \luabridgeExecute{ print(1 + 2) } $
\luabridgeExecute{x = 1 -- this will have no effect due to sandboxing}
$ 1 + 2 = \luabridgeExecute{if x == nil then print(1 + 2) end} $
\bye
3 changes: 2 additions & 1 deletion lt3luabridge.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@
local~ran_ok, error = pcall(function()
local~ran_ok, kpse = pcall(require,~"kpse")
if~ran_ok~then~kpse.set_program_name("luatex") end~
\exp_not:V \l_tmpa_tl~
\exp_not:V \l_tmpa_tl
\iow_newline:
end)
if~not~ran_ok~then~
local~file = io.open("
Expand Down

0 comments on commit 1542705

Please sign in to comment.