-
Notifications
You must be signed in to change notification settings - Fork 114
Correct the fix to trim spaces from gnuplot function
#1412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9671434
fix!: trim spaces from `gnuplot` functions correctly
muzimuzhi daf249c
feat: emulate `runsystem(...)` logging for LuaTeX
muzimuzhi 9f308f3
test: setup shell-escape test set; add a gnuplot test
muzimuzhi ef6a38a
test: extend gnuplot test
muzimuzhi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| -- Tests which require shell escape enabled | ||
|
|
||
| testfiledir = "testfiles-shell" | ||
| checkopts = "-interaction=nonstopmode -shell-escape" | ||
|
|
||
| -- files removed between different engine tests | ||
| dynamicfiles = {"*.gnuplot", "*.table"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| \documentclass{article} | ||
| \input{pgf-regression-test} | ||
|
|
||
| \usepackage{tikz} | ||
|
|
||
| \begin{document} | ||
|
|
||
| \START | ||
|
|
||
| \BEGINTEST{no .gnuplot} | ||
| \begin{tikzpicture} | ||
| \draw[id=normal] plot[domain=-2:2] function {x**2}; | ||
| \end{tikzpicture} | ||
|
|
||
| \SHOWFILE{\jobname.normal.gnuplot} | ||
| \ENDTEST | ||
|
|
||
| \BEGINTEST{no .gnuplot, leading space in function} | ||
| \begin{tikzpicture} | ||
| \draw[id=leading-space] plot[domain=-2:2] function { x**2}; | ||
| \end{tikzpicture} | ||
|
|
||
| \SHOWFILE{\jobname.leading-space.gnuplot} | ||
| \ENDTEST | ||
|
|
||
| \BEGINTEST{no .gnuplot, trailing space in function} | ||
| \begin{tikzpicture} | ||
| \draw[id=trailing-space] plot[domain=-2:2] function {x**2 }; | ||
| \end{tikzpicture} | ||
|
|
||
| \SHOWFILE{\jobname.trailing-space.gnuplot} | ||
| \ENDTEST | ||
|
|
||
| \BEGINTEST{.gnuplot existing and matched} | ||
| \begin{tikzpicture} | ||
| \draw[id=normal] plot[domain=-2:2] function {x**2}; | ||
| \draw[id=leading-space] plot[domain=-2:2] function { x**2}; | ||
| \draw[id=trailing-space] plot[domain=-2:2] function {x**2 }; | ||
| \end{tikzpicture} | ||
| \ENDTEST | ||
|
|
||
| \BEGINTEST{.gnuplot existing but outdated} | ||
| \begin{tikzpicture} | ||
| % use the existing id but a different domain | ||
| \draw[id=normal] plot[domain=-4:4] function {x**2}; | ||
| \end{tikzpicture} | ||
|
|
||
| \SHOWFILE{\jobname.normal.gnuplot} | ||
| \ENDTEST | ||
|
|
||
| \END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| This is a generated file for the l3build validation system. | ||
| Don't change this file in any respect. | ||
| ============================================================ | ||
| TEST 1: no .gnuplot | ||
| ============================================================ | ||
| runsystem(gnuplot gh1397.normal.gnuplot)...executed. | ||
| -------- gh1397.normal.gnuplot (start) --------- | ||
| (gh1397.normal.gnuplot) set table "gh1397.normal.table"; set format "%.5f"[nl] | ||
| set samples 25; plot [x=-2:2] x**2[nl] | ||
| -------- gh1397.normal.gnuplot (end) ----------- | ||
| ============================================================ | ||
| ============================================================ | ||
| TEST 2: no .gnuplot, leading space in function | ||
| ============================================================ | ||
| runsystem(gnuplot gh1397.leading-space.gnuplot)...executed. | ||
| -------- gh1397.leading-space.gnuplot (start) --------- | ||
| (gh1397.leading-space.gnuplot) set table "gh1397.leading-space.table"; set format "%.5f"[nl] | ||
| set samples 25; plot [x=-2:2] x**2[nl] | ||
| -------- gh1397.leading-space.gnuplot (end) ----------- | ||
| ============================================================ | ||
| ============================================================ | ||
| TEST 3: no .gnuplot, trailing space in function | ||
| ============================================================ | ||
| runsystem(gnuplot gh1397.trailing-space.gnuplot)...executed. | ||
| -------- gh1397.trailing-space.gnuplot (start) --------- | ||
| (gh1397.trailing-space.gnuplot) set table "gh1397.trailing-space.table"; set format "%.5f"[nl] | ||
| set samples 25; plot [x=-2:2] x**2[nl] | ||
| -------- gh1397.trailing-space.gnuplot (end) ----------- | ||
| ============================================================ | ||
| ============================================================ | ||
| TEST 4: .gnuplot existing and matched | ||
| ============================================================ | ||
| ============================================================ | ||
| ============================================================ | ||
| TEST 5: .gnuplot existing but outdated | ||
| ============================================================ | ||
| runsystem(gnuplot gh1397.normal.gnuplot)...executed. | ||
| -------- gh1397.normal.gnuplot (start) --------- | ||
| (gh1397.normal.gnuplot) set table "gh1397.normal.table"; set format "%.5f"[nl] | ||
| set samples 25; plot [x=-4:4] x**2[nl] | ||
| -------- gh1397.normal.gnuplot (end) ----------- | ||
| ============================================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will only ever call
texio.write_nlonce, so we don't gain anything from the local binding, but you can leave it. Just wanted to point that out.