From ec6dfcde90e79d75b4199fa5fbf9fe0db5d4d0f5 Mon Sep 17 00:00:00 2001 From: Whiteknight Date: Mon, 28 Mar 2011 11:23:55 -0400 Subject: [PATCH] Add in a Custom TestFile type, which we can use for specifying a custom run command for tests which don't fit an existing mold but aren't hard to invoke --- src/tap_harness/testfile/Custom.winxed | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/tap_harness/testfile/Custom.winxed diff --git a/src/tap_harness/testfile/Custom.winxed b/src/tap_harness/testfile/Custom.winxed new file mode 100644 index 00000000..87f6b5fa --- /dev/null +++ b/src/tap_harness/testfile/Custom.winxed @@ -0,0 +1,24 @@ +namespace Rosella { namespace Harness { namespace TestFile +{ + class Custom : Rosella.Harness.TestFile + { + var cmd_fmt; + + function BUILD(string cmd) + { + self.cmd_fmt = cmd; + } + + function compile_test() + { + // TODO: Is there a way we can add this? + using Rosella.Error.invalid; + invalid("Harness.TestFile.Custom", "Cannot be used for inline testing"); + } + + function get_spawn_command() + { + return sprintf(self.cmd_fmt, [self.filename]); + } + } +}}}