17%mp_assertscope(SNAPSHOT)
19%mp_streamfile(iftrue=(1=0)
20 ,contenttype=csv,inloc=/some/where.txt
24%mp_assertscope(COMPARE)
28 desc=Checking the failure condition,
29 outds=work.test_results
37%mp_ds2pdf(sashelp.class, outref=pdfsrc, title=Streamed)
42%let hdrpath=%sysfunc(pathname(work))/pdfheaders.txt;
43%let _sasjs_webout_headers=&hdrpath;
45%mp_streamfile(contenttype=PDF,inref=pdfsrc,outref=pdfdst
49 length verdict $6 hdrexp $6;
51 srcsz=finfo(fid,'File Size (bytes)');
54 dstsz=finfo(fid,'File Size (bytes)');
56 call symputx('srcsize',srcsz,
'l');
57 call symputx('dstsize',dstsz,
'l');
61 if fileexist(
"&hdrpath") then do;
62 infile
"&hdrpath" truncover end=eof;
65 if index(_infile_,'Content-Type')
66 and index(_infile_,'application/pdf') then verdict='PASS';
69 call symputx('hdrverdict',verdict,
'l');
73 if
"&mcTestPlatform"=
"SASJS" then hdrexp='PASS';
74 call symputx('hdrexp',hdrexp,
'l');
78 iftrue=(&dstsize=&srcsize),
79 desc=Checking the PDF was copied to the destination,
80 outds=work.test_results
83 iftrue=(
"&hdrverdict"=
"&hdrexp"),
84 desc=Checking the PDF content type header,
85 outds=work.test_results