[latex3-commits] [git/LaTeX3-latex3-xcolor] testl3color: testfile for colorlet (8ebf74b)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Aug 16 17:06:37 CEST 2022


Repository : https://github.com/latex3/xcolor
On branch  : testl3color
Link       : https://github.com/latex3/xcolor/commit/8ebf74b85b5a890852b6d0a730e839b70e44fbef

>---------------------------------------------------------------

commit 8ebf74b85b5a890852b6d0a730e839b70e44fbef
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Aug 16 17:06:37 2022 +0200

    testfile for colorlet


>---------------------------------------------------------------

8ebf74b85b5a890852b6d0a730e839b70e44fbef
 testfiles/l3color-define-04.lvt                    | 58 ++++++++++++++++++++++
 ...l3color-define-01.tlg => l3color-define-04.tlg} |  0
 2 files changed, 58 insertions(+)

diff --git a/testfiles/l3color-define-04.lvt b/testfiles/l3color-define-04.lvt
new file mode 100644
index 0000000..a766c60
--- /dev/null
+++ b/testfiles/l3color-define-04.lvt
@@ -0,0 +1,58 @@
+% !Mode:: "TeX:UTF-8:Main"
+\DocumentMetadata{}
+\input{regression-test}
+\documentclass{article}
+
+\usepackage{xcolor}
+
+
+\begin{document}
+\ExplSyntaxOn\makeatletter
+% no full support for spot colors, 
+% they use the cmyk fallback. 
+\TEST{colorlet}
+ {
+   \colorlet{test}{red}
+   \color_export:nnN  {red}{backend}\l_tmpa_tl
+   \color_export:nnN  {test}{backend}\l_tmpb_tl
+   \ASSERTSTR{\l_tmpa_tl}{\l_tmpb_tl}
+ }
+ 
+\TEST{colorlet}
+ {
+   \colorlet{test}{red!50!blue}
+   \color_export:nnnN {rgb}{0.5,0,0.5}{backend}\l_tmpa_tl
+   \color_export:nnN  {test}{backend}\l_tmpb_tl
+   \ASSERTSTR{\l_tmpa_tl}{\l_tmpb_tl}
+ } 
+ 
+\TEST{colorlet}
+ {
+   \colorlet{test}[cmyk]{red!50!blue}
+   \color_export:nnnN {cmyk}{0,0.5,0,0.5}{backend}\l_tmpa_tl
+   \color_export:nnN  {test}{backend}\l_tmpb_tl
+   \ASSERTSTR{\l_tmpa_tl}{\l_tmpb_tl}
+ }  
+ 
+%the named + ps is only of interest in dvips, and is ignored by l3color 
+\TEST{colorlet}
+ {
+   \colorlet[named]{test}{red!50!blue}
+   \color_export:nnnN {rgb}{0.5,0,0.5}{backend}\l_tmpa_tl
+   \color_export:nnN  {test}{backend}\l_tmpb_tl
+   \ASSERTSTR{\l_tmpa_tl}{\l_tmpb_tl}
+ }   
+ 
+% value is always black with l3color 
+\TEST{colorlet}
+ {
+   \colorlet[ps]{test}{red!50!blue}
+   \color_export:nnnN {rgb}{1,1,1}{backend}\l_tmpa_tl
+   \color_export:nnN  {test}{backend}\l_tmpb_tl
+   \ASSERTSTR{\l_tmpa_tl}{\l_tmpb_tl}
+ }    
+\ExplSyntaxOff
+
+
+\OMIT 
+\end{document}
diff --git a/testfiles/l3color-define-01.tlg b/testfiles/l3color-define-04.tlg
similarity index 100%
copy from testfiles/l3color-define-01.tlg
copy to testfiles/l3color-define-04.tlg





More information about the latex3-commits mailing list.