• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/ruby
2# showtest.rb - simple CLI interface to grab a testcase
3#####################
4#
5# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
6#
7# This software is provided 'as-is', without any express or implied warranty.
8# In no event will the authors be held liable for any damages arising from the
9# use of this software.
10#
11# Permission is granted to anyone to use this software for any purpose,
12# including commercial applications, and to alter it and redistribute it
13# freely, subject to the following restrictions:
14#
15# 1. The origin of this software must not be misrepresented; you must not
16# claim that you wrote the original software. If you use this software in a
17# product, an acknowledgment in the product documentation would be appreciated
18# but is not required.
19#
20# 2. Altered source versions must be plainly marked as such, and must not be
21# misrepresented as being the original software.
22#
23# 3. This notice may not be removed or altered from any source distribution.
24
25Dir.chdir('../htdocs')
26require 'iexploder';
27require 'config';
28
29### THE INTERACTION ##################################
30ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
31ie.readTagFiles()
32
33if ! ARGV[0]
34  puts "syntax: showtest.rb [test#] [subtest#]"
35  exit
36end
37
38ie.test_num = ARGV[0].to_i
39ie.subtest_num = ARGV[1].to_i || 0
40ie.lookup_mode = 1
41ie.setRandomSeed
42
43puts ie.buildPage()
44