diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-21 23:34:23 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-21 23:34:23 +0000 |
commit | 0971310be8093ab53b430ac5a8c7217ba8bf76a9 (patch) | |
tree | 430e54909f8969f26670c7e8873696ae2666bd80 /lib/custodian/protocoltest.rb | |
parent | b7608cc947bcca078644516a288a6bef67f7f09a (diff) |
Serialize and cosntruct neatly
Diffstat (limited to 'lib/custodian/protocoltest.rb')
-rw-r--r-- | lib/custodian/protocoltest.rb | 9 |
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!( "." ) |