#!/usr/local/bin/ruby
# test4.rb -- like test3 but creates two trees and compares them
# by Filip Pizlo, 2001
# expected output: true
# use Dussel.txt as input
require 'AVL'
dict=[]
2.times {
	| i |
	dict[i]=AVL::AVL.new
	File.open(ARGV[0]).read.split(/[^a-zA-Z0-9]+/).each {
		| word |
		dict[i].insert word, true
	}
}
puts dict[0]==dict[1]
