Sha256: 03835c08c70f916748d69bb9a6e1f09ab5257598462e90846183a00abc0b60fe

Contents?: true

Size: 892 Bytes

Versions: 6

Compression:

Stored size: 892 Bytes

Contents

#!/usr/local/bin/ruby
require "xppMultibyte"

class Chew

	def resolve(name)
		return "fake it"
	end

	def run
		@allFiles = File.new ARGV[1]

		while true do
			fileName = @allFiles.gets
			if nil == fileName then
				break
			end
			fileName.chop!

			@xpp = Xpp.new
			@xpp.input = File.new(fileName)
			@xpp.resolver = self
@xpp.processNamespace = false
@xpp.reportNamespaceAttributes = false
		
			begin
				i = 0
				while not @xpp.endDocument? do
					type = @xpp.nextEvent
					i += 1
				end
				printf("%sPASSED '%s' -- there were %d events\n", (("PASS" == ARGV[0])? " " : "#"), fileName, i)
			rescue RuntimeError => message
				printf("%sFAILED [%s] '%s'\n", (("FAIL" == ARGV[0])? " " : "#"), message, fileName)
			rescue Exception => message
				printf("%sFAILED [%s] '%s'\n", (("FAIL" == ARGV[0])? " " : "#"), message, fileName)
			end
		end
	end
end

chew = Chew.new
chew.run

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
hutch-xamplr-pp-1.0.0 lib/xamplr-pp/toys/chewMultibyte.rb
hutch-xamplr-pp-1.1.0 lib/xamplr-pp/toys/chewMultibyte.rb
hutch-xamplr-pp-1.1.2 lib/xamplr-pp/toys/chewMultibyte.rb
xamplr-pp-1.2.0 lib/xamplr-pp/toys/chewMultibyte.rb
xamplr-pp-1.1.4 lib/xamplr-pp/toys/chewMultibyte.rb
xamplr-pp-1.0.0 lib/xamplr-pp/toys/chewMultibyte.rb