1563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#!/usr/bin/ruby 2563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# showtest.rb - simple CLI interface to grab a testcase 3563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark##################### 4563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 5563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org> 6563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 7563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# This software is provided 'as-is', without any express or implied warranty. 8563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# In no event will the authors be held liable for any damages arising from the 9563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# use of this software. 10563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 11563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Permission is granted to anyone to use this software for any purpose, 12563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# including commercial applications, and to alter it and redistribute it 13563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# freely, subject to the following restrictions: 14563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 15563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 1. The origin of this software must not be misrepresented; you must not 16563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# claim that you wrote the original software. If you use this software in a 17563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# product, an acknowledgment in the product documentation would be appreciated 18563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# but is not required. 19563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 20563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 2. Altered source versions must be plainly marked as such, and must not be 21563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# misrepresented as being the original software. 22563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 23563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 3. This notice may not be removed or altered from any source distribution. 24563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 25563af33bc48281d19dce701398dbb88cb54fd7ecCary ClarkDir.chdir('../htdocs') 26563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkrequire 'iexploder'; 27563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkrequire 'config'; 28563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 29563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark### THE INTERACTION ################################## 30563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS) 31563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkie.readTagFiles() 32563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 33563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkif ! ARGV[0] 34563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark puts "syntax: showtest.rb [test#] [subtest#]" 35563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark exit 36563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkend 37563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 38563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkie.test_num = ARGV[0].to_i 39563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkie.subtest_num = ARGV[1].to_i || 0 40563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkie.lookup_mode = 1 41563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkie.setRandomSeed 42563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark 43563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkputs ie.buildPage() 44