App-Basis-ConvertText2
view release on metacpan or search on metacpan
t/02_plugins.t view on Meta::CPAN
# uml
$content = "'start/enduml tags are optional
\@startuml
skinparam backgroundcolor AntiqueWhite
left to right direction
skinparam packageStyle rect
actor customer
actor clerk
rectangle checkout {
customer -- (checkout)
(checkout) .> (payment) : include
(help) .> (checkout) : extends
(checkout) -- clerk
}
\@enduml";
$obj = App::Basis::ConvertText2::Plugin::Uml->new();
$params = undef;
$out = $obj->process( 'uml', $content, $params, $TEST_DIR );
ok( has_file($out), 'uml created a file' );
# gle
$content = 'size 10 9
set font texcmr hei 0.5 just tc
begin letz
data "saddle.z"
z = 3/2*(cos(3/5*(y-1))+5/4)/(1+(((x-4)/3)^2))
x from 0 to 20 step 0.5
y from 0 to 20 step 0.5
end letz
amove pagewidth()/2 pageheight()-0.1
write "Saddle Plot (3D)"
begin object saddle
begin surface
size 10 9
data "saddle.z"
xtitle "X-axis" hei 0.35 dist 0.7
ytitle "Y-axis" hei 0.35 dist 0.7
ztitle "Z-axis" hei 0.35 dist 0.9
top color blue
zaxis ticklen 0.1 min 0 hei 0.25
xaxis hei 0.25 dticks 4 nolast nofirst
yaxis hei 0.25 dticks 4
end surface
end object
amove pagewidth()/2 0.2
draw "saddle.bc"
';
$obj = App::Basis::ConvertText2::Plugin::Gle->new();
$params = undef;
$out = $obj->process( 'gle', $content, $params, $TEST_DIR );
ok( has_file($out), 'gle created a file' );
# gle
$content = '#
# $Id: surface1.dem,v 1.11 2004/09/17 05:01:12 sfeam Exp $
#
set term png size 600, 400
set output "/tmp/saddle.png"
set samples 21
set isosample 11
set xlabel "X axis" offset -3,-2
set ylabel "Y axis" offset 3,-2
set zlabel "Z axis" offset -5
set title "3D gnuplot demo"
set label 1 "This is the surface boundary" at -10,-5,150 center
set arrow 1 from -10,-5,120 to -10,0,0 nohead
set arrow 2 from -10,-5,120 to 10,0,0 nohead
set arrow 3 from -10,-5,120 to 0,10,0 nohead
set arrow 4 from -10,-5,120 to 0,-10,0 nohead
set xrange [-10:10]
set yrange [-10:10]
splot x*y
';
$obj = App::Basis::ConvertText2::Plugin::Gnuplot->new();
$params = undef;
$out = $obj->process( 'gnuplot', $content, $params, $TEST_DIR );
ok( has_file($out), 'gnuplot created a file' );
}
else {
skip "Author testing programs", 6;
}
}
path($TEST_DIR)->remove_tree;
# -----------------------------------------------------------------------------
# completed all the tests
( run in 0.539 second using v1.01-cache-2.11-cpan-df04353d9ac )