1- component extends = " org.lucee.cfml.test.LuceeTestCase" labels = " pdf" skip = " true " {
1+ component extends = " org.lucee.cfml.test.LuceeTestCase" labels = " pdf" {
22 function run ( testResults , testBox ) {
3- describe (" Testcase for LDEV-1004" , function () {
4- it ( title = " check placeholders are resolved (modern)" , body = function ( currentSpec ) {
3+ describe (" Testcase for LDEV-1004 evalAtPrint=true " , function () {
4+ xit ( title = " check placeholders are resolved (modern), evalAtPrint=true " , body = function ( currentSpec ) {
55
66 local .result = _internalRequest (
77 template : " #createURI (" LDEV1004" ) #/placeholders.cfm" ,
88 url : {
9- type : " modern"
9+ type : " modern" ,
10+ evalAtPrint : " true"
1011 }
1112 );
1213 local .pdf = local .result .filecontent_binary ;
@@ -21,12 +22,58 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="pdf" skip="true" {
2122
2223 });
2324
24- it ( title = " check placeholders are resolved (classic)" , body = function ( currentSpec ) {
25+ xit ( title = " check placeholders are resolved (classic), evalAtPrint=true " , body = function ( currentSpec ) {
2526
2627 local .result = _internalRequest (
2728 template : " #createURI (" LDEV1004" ) #/placeholders.cfm" ,
2829 url : {
29- type : " classic"
30+ type : " classic" ,
31+ evalAtPrint : " true"
32+ }
33+ );
34+ local .pdf = local .result .filecontent_binary ;
35+ expect ( isPDFObject ( pdf ) ).toBeTrue ();
36+
37+ pdf action = " extractText" source = " #pdf #" name = " local.extractedText" ;
38+
39+ expect ( extractedText ).notToInclude (" currentPageNumber" , " placeholder [currentPageNumber] should be resolved" );
40+ expect ( extractedText ).notToInclude (" totalPageCount" , " placeholder [currentPageNumber] should be resolved" );
41+ expect ( extractedText ).notToInclude (" totalSectionPageCount" , " placeholder [totalSectionPageCount] should be resolved" );
42+ expect ( extractedText ).notToInclude (" currentSectionPageNumber" , " placeholder [currentSectionPageNumber] should be resolved" );
43+
44+ });
45+ });
46+
47+ describe (" Testcase for LDEV-1004 evalAtPrint=false" , function () {
48+
49+ it ( title = " check placeholders are resolved (modern), evalAtPrint=false" , body = function ( currentSpec ) {
50+
51+ local .result = _internalRequest (
52+ template : " #createURI (" LDEV1004" ) #/placeholders.cfm" ,
53+ url : {
54+ type : " modern" ,
55+ evalAtPrint : " false"
56+ }
57+ );
58+ local .pdf = local .result .filecontent_binary ;
59+ expect ( isPDFObject ( pdf ) ).toBeTrue ();
60+
61+ pdf action = " extractText" source = " #pdf #" name = " local.extractedText" ;
62+
63+ expect ( extractedText ).notToInclude (" currentPageNumber" , " placeholder [currentPageNumber] should be resolved" );
64+ expect ( extractedText ).notToInclude (" totalPageCount" , " placeholder [currentPageNumber] should be resolved" );
65+ expect ( extractedText ).notToInclude (" totalSectionPageCount" , " placeholder [totalSectionPageCount] should be resolved" );
66+ expect ( extractedText ).notToInclude (" currentSectionPageNumber" , " placeholder [currentSectionPageNumber] should be resolved" );
67+
68+ });
69+
70+ it ( title = " check placeholders are resolved (classic), evalAtPrint=false" , body = function ( currentSpec ) {
71+
72+ local .result = _internalRequest (
73+ template : " #createURI (" LDEV1004" ) #/placeholders.cfm" ,
74+ url : {
75+ type : " classic" ,
76+ evalAtPrint : " false"
3077 }
3178 );
3279 local .pdf = local .result .filecontent_binary ;
0 commit comments