summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-21 23:34:23 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-21 23:34:23 +0000
commit31fdb85b20719eb2dab4d6e3cfea721e6c58ac08 (patch)
tree430e54909f8969f26670c7e8873696ae2666bd80 /lib/custodian/protocoltest.rb
parent7d153d8f22fc767108103cd8fdfc056e2656b914 (diff)
Serialize and cosntruct neatly
Diffstat (limited to 'lib/custodian/protocoltest.rb')
-rw-r--r--lib/custodian/protocoltest.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/custodian/protocoltest.rb b/lib/custodian/protocoltest.rb
index 9a843c2..1a2f796 100644
--- a/lib/custodian/protocoltest.rb
+++ b/lib/custodian/protocoltest.rb
@@ -30,6 +30,15 @@ class ProtocolTest
#
#
def self.create( line )
+
+ #
+ # JSON ?
+ #
+ if ( line =~ /^\{(.*)\}$/ )
+ obj = JSON.parse( line );
+ line = obj["line"]
+ end
+
if ( line =~ /must\s+run\s+(\S+)(\s+|\.|$)/ )
test_type = $1.dup
test_type.chomp!( "." )