%%
%% This is file `pdfrender-test4.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% pdfrender.dtx  (with options: `test4')
%% 
%% This is a generated file.
%% 
%% Project: pdfrender
%% Version: 2010/01/28 v1.2
%% 
%% Copyright (C) 2010 by
%%    Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% This Current Maintainer of this work is Heiko Oberdiek.
%% 
%% The Base Interpreter refers to any `TeX-Format',
%% because some files are installed in TDS:tex/generic//.
%% 
%% This work consists of the main source file pdfrender.dtx
%% and the derived files
%%    pdfrender.sty, pdfrender.pdf, pdfrender.ins, pdfrender.drv,
%%    pdfrender-test1.tex, pdfrender-test2.tex,
%%    pdfrender-test3.tex, pdfrender-test4.tex,
%%    pdfrender-test5.tex.
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{pdfrender-test4.tex}[2010/01/28]
\documentclass[12pt]{article}
\usepackage{pdfrender}[2010/01/28]
\usepackage{color}
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
\makeatletter
\newcommand*{\CheckColor}[1]{%
  \Expect{#1}*{\current@color}%
}
\makeatother
\begin{document}
  \begin{qstest}{color}{color}%
    \CheckColor{0 g 0 G}%
    \Huge\bfseries
    \noindent
    \textpdfrender{%
      TextRenderingMode=2,%
      LineWidth=.5,%
      FillColor=yellow,%
      StrokeColor=blue,%
    }{%
      \CheckColor{0 0 1 0 k 0 0 1 RG}%
      Blue(Yellow)\\%
      \textpdfrender{%
        FillColor=green,%
      }{%
        \CheckColor{0 1 0 rg 0 0 1 RG}%
        Blue(Green)%
      }\\%
      \CheckColor{0 0 1 0 k 0 0 1 RG}%
      Blue(Yellow)\\%
      \textpdfrender{%
        StrokeColor=red,%
      }{%
        \CheckColor{0 0 1 0 k 1 0 0 RG}%
        Red(Yellow)%
      }\\%
      \CheckColor{0 0 1 0 k 0 0 1 RG}%
      Blue(Yellow) %
    }%
  \end{qstest}%
  \begin{qstest}{colorlast}{colorlast}%
    \makeatletter
    \def\Test#1#2#3{%
      \begingroup
        \def\current@color{#1}%
        \textpdfrender{#2}{%
          \CheckColor{#3}%
        }%
      \endgroup
    }%
    \Test{1 g 0 0 1 RG 0 0 1 0 k 0.5 G}%
         {StrokeColor=green}%
         {0 0 1 0 k 0 1 0 RG}%
    \Test{1 g 0 0 1 RG 0 0 1 0 k 0.5 G}%
         {FillColor=red}%
         {1 0 0 rg 0.5 G}%
  \end{qstest}%
\end{document}
\endinput
%%
%% End of file `pdfrender-test4.tex'.
