Skip to content

Commit

Permalink
test: Add test for pgf-tikz#1123
Browse files Browse the repository at this point in the history
Signed-off-by: muzimuzhi <muzimuzhi@gmail.com>
  • Loading branch information
muzimuzhi committed Jan 10, 2022
1 parent da05bf5 commit ca7b282
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
33 changes: 33 additions & 0 deletions testfiles/pgfmath-gh1123.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
\documentclass{minimal}
\input{pgf-regression-test}

\RequirePackage{pgfmath}

\makeatletter
\csname protected\endcsname\long\def\ASSERTPGFMATHFUNCTIONS#1#2{%
\pgfexpl@tl@if@eq@@ccTF{pgfmath#1@}{pgfmath#2@}{%
\TYPE{PASSED}%
\TYPE{\pgfexpl@cs@meaning@@c{pgfmath#1@}}%
}{%
\TYPE{FAILED}%
\TYPE{\pgfexpl@cs@meaning@@c{pgfmath#1@}}%
\TYPE{\pgfexpl@cs@meaning@@c{pgfmath#2@}}%
}%
}
\makeatother

\START

\BEGINTEST{/pgf/declare function, space(s) in arg list}
\pgfkeys{
/pgf/declare function={
funcA( \x,\y) = sqrt(\x^2 + \y^2);
funcB( \x, \y) = sqrt(\x^2 + \y^2);
funcX(\x,\y) = sqrt(\x^2 + \y^2);
}
}
\ASSERTPGFMATHFUNCTIONS{funcA}{funcX}
\ASSERTPGFMATHFUNCTIONS{funcB}{funcX}
\ENDTEST

\END
10 changes: 10 additions & 0 deletions testfiles/pgfmath-gh1123.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
============================================================
TEST 1: /pgf/declare function, space(s) in arg list
============================================================
PASSED
macro:#1#2->\pgfmathparse {sqrt(#1^2+#2^2)}
PASSED
macro:#1#2->\pgfmathparse {sqrt(#1^2+#2^2)}
============================================================

0 comments on commit ca7b282

Please sign in to comment.