Warning, file /frameworks/syntax-highlighting/autotests/html/std_b00001.vtc.html was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 <!DOCTYPE html> 0002 <html><head> 0003 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 0004 <title>std_b00001.vtc</title> 0005 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (Varnish Test Case language) - Theme (Breeze Light)"/> 0006 </head><body style="background-color:#ffffff;color:#1f1c1b"><pre> 0007 <span style="font-weight:bold;">varnishtest</span> <span style="color:#bf0303;">"Test std.random()"</span> 0008 0009 <span style="font-weight:bold;">server</span> <span style="color:#0095ff;text-decoration:underline;">s1</span><span style="color:#bf0303;"> </span>{ 0010 <span style="font-weight:bold;">rxreq</span> 0011 <span style="font-weight:bold;">txresp</span> 0012 } <span style="font-weight:bold;">-start</span> 0013 0014 <span style="font-weight:bold;">varnish</span> <span style="color:#0095ff;text-decoration:underline;">v1</span><span style="font-weight:bold;"> -vcl+backend</span> { 0015 <span style="font-weight:bold;">import</span> <span style="color:#0057ae;font-weight:bold;">std</span>; 0016 0017 <span style="font-weight:bold;">sub</span> <span style="color:#644a9b;font-weight:bold;">vcl_deliver</span> { 0018 <span style="font-weight:bold;">set</span> <span style="color:#0095ff;">resp.http.rnd1</span> <span style="color:#006e28;">=</span> <span style="color:#0057ae;">std.random</span>(<span style="color:#b08000;">0</span>, <span style="color:#b08000;">1</span>); 0019 <span style="font-weight:bold;">set</span> <span style="color:#0095ff;">resp.http.rnd2</span> <span style="color:#006e28;">=</span> <span style="color:#0057ae;">std.random</span>(<span style="color:#b08000;">0</span>, <span style="color:#b08000;">10</span>); 0020 <span style="font-weight:bold;">set</span> <span style="color:#0095ff;">resp.http.rnd3</span> <span style="color:#006e28;">=</span> <span style="color:#0057ae;">std.random</span>(<span style="color:#b08000;">8</span>, <span style="color:#b08000;">10</span>); 0021 <span style="font-weight:bold;">set</span> <span style="color:#0095ff;">resp.http.rnd4</span> <span style="color:#006e28;">=</span> <span style="color:#0057ae;">std.random</span>(<span style="color:#b08000;">99</span>, <span style="color:#b08000;">100</span>); 0022 } 0023 } <span style="font-weight:bold;">-start</span> 0024 0025 <span style="font-weight:bold;">varnish</span> <span style="color:#0095ff;text-decoration:underline;">v1</span> <span style="font-weight:bold;">-cliok </span><span style="color:#bf0303;">"debug.srandom"</span> 0026 0027 <span style="font-weight:bold;">client</span> <span style="color:#0095ff;text-decoration:underline;">c1</span><span style="color:#bf0303;"> </span>{ 0028 <span style="font-weight:bold;">txreq</span> 0029 <span style="font-weight:bold;">rxresp</span> 0030 <span style="font-weight:bold;">expect</span> <span style="color:#0095ff;">resp.http.rnd1</span> <span style="color:#006e28;">==</span> <span style="color:#b08000;">0.656</span> 0031 <span style="font-weight:bold;">expect</span> <span style="color:#0095ff;">resp.http.rnd2</span> <span style="color:#006e28;">==</span> <span style="color:#b08000;">0.390</span> 0032 <span style="font-weight:bold;">expect</span> <span style="color:#0095ff;">resp.http.rnd3</span> <span style="color:#006e28;">==</span> <span style="color:#b08000;">8.585</span> 0033 <span style="font-weight:bold;">expect</span> <span style="color:#0095ff;">resp.http.rnd4</span> <span style="color:#006e28;">==</span> <span style="color:#b08000;">99.636</span> 0034 } <span style="font-weight:bold;">-run</span> 0035 </pre></body></html>