From 4b36a0bca27a8628ab3625a10d9b668c48f056f6 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 18 Jan 2016 20:37:31 +1000 Subject: Adding some script engine test scripts, courtesy of LL, I think. Gotta lotta work todo. lol --- media/Test%20sim/test/TESTICLE_sample.lsl | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 media/Test%20sim/test/TESTICLE_sample.lsl (limited to 'media/Test%20sim/test/TESTICLE_sample.lsl') diff --git a/media/Test%20sim/test/TESTICLE_sample.lsl b/media/Test%20sim/test/TESTICLE_sample.lsl new file mode 100755 index 0000000..599d103 --- /dev/null +++ b/media/Test%20sim/test/TESTICLE_sample.lsl @@ -0,0 +1,45 @@ +integer verbosity = 1; + + +default +{ + state_entry() + { + integer success = 1; + string result = ""; + + + // + // Put your tests here. + // + + + if (success) + { + if (0 == verbosity) + result = result + "Shhh."; + if (1 == verbosity) + result = result + "Passed the testicle."; + if (2 == verbosity) + result = result + "The script called '" + llGetScriptName() + ".lsl' has passed all of it's tests, not that it has any."; + result = result + " - SUCCESS"; + } + else + { + if (0 == verbosity) + result = result + "Shhh."; + if (1 == verbosity) + result = result + "Failed the testicle."; + if (2 == verbosity) + result = result + "The script called '" + llGetScriptName() + ".lsl' has failed all of it's tests, not that it has any."; + result = result + " - FAILURE!!!"; + } + + llSay(0, llGetScriptName() + ": " + result); + } + + on_rez(integer start_param) + { + llResetScript(); + } +} -- cgit v1.1