1 Testing that require(), render() and include() properly toggle between 2 raw- and template parse mode. 3 4 5 1. Testing recursive invocation. 6 7 -- Testcase -- 8 require("files.requiretest"); 9 print(render("files/render-test.uc")); 10 include("files/include-test.uc"); 11 -- End -- 12 13 -- Args -- 14 -R 15 -- End -- 16 17 -- File requiretest.uc -- 18 print("This is a raw mode file loaded by require()\n"); 19 print(render("require-render-test.uc")); 20 include("require-include-test.uc"); 21 -- End -- 22 23 -- File require-include-test.uc -- 24 print("This is a raw mode file included by a required file\n"); 25 -- End -- 26 27 -- File require-render-test.uc -- 28 This is a {{ "template mode" }} file rendered by a required file 29 -- End -- 30 31 -- File render-test.uc -- 32 This is a {{ "template mode" }} file loaded by render() from a raw mode file 33 -- End -- 34 35 -- File include-test.uc -- 36 print("This is a raw mode file loaded by include() from a raw mode file\n"); 37 -- End -- 38 39 -- Expect stdout -- 40 This is a raw mode file loaded by require() 41 This is a template mode file rendered by a required file 42 This is a raw mode file included by a required file 43 This is a template mode file loaded by render() from a raw mode file 44 This is a raw mode file loaded by include() from a raw mode file 45 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt