Changeset 319 for ruby/trunk/lib/adl_parser/test/remote_adl_test.rb
- Timestamp:
- Oct 14, 2009, 5:29:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/adl_parser/test/remote_adl_test.rb
r318 r319 3 3 class RemoteADLTest < Test::Unit::TestCase 4 4 def setup 5 @ adls = []6 dirs = ["cluster/", "composition/", "element/", "entry/", "section/", "structure/"]7 dirs.each do |dir|5 @ehr_adls = [] 6 ehr_dirs = ["cluster", "composition", "element", "entry", "section", "structure"] 7 ehr_dirs.each do |dir| 8 8 doc = Hpricot( open("http://www.openehr.org/svn/knowledge/archetypes/dev/adl/openehr/ehr/#{dir}").read ) 9 9 (doc/:a).each do |link| 10 10 if link[:href] =~ /.*\.adl\Z/ 11 @adls << "http://www.openehr.org/svn/knowledge/archetypes/dev/adl/openehr/ehr/#{dir}#{$~}" 11 @ehr_adls << "http://www.openehr.org/svn/knowledge/archetypes/dev/adl/openehr/ehr/#{dir}/#{$~}" 12 end 13 end 14 end 15 16 @test_adls = [] 17 test_dirs = ["basics","clinical_types","dadl","description","generic_types","language","non-conforming","paths","rm_checking","slots","specialisation","structure","terminology","unicode","validation"] 18 test_dirs.each do |dir| 19 doc = Hpricot( open("http://www.openehr.org/svn/knowledge/archetypes/dev/adl/test/#{dir}").read ) 20 (doc/:a).each do |link| 21 if link[:href] =~ /.*\.adl\Z/ 22 @test_adls << "http://www.openehr.org/svn/knowledge/archetypes/dev/adl/test/#{dir}/#{$~}" 12 23 end 13 24 end … … 16 27 end 17 28 18 must "adls should properly parsed" do 29 30 must "test_adls should properly parsed" do 19 31 assert_nothing_raised do 20 @ adls.each do |adl|32 @test_adls.each do |adl| 21 33 puts "Processing #{adl}" 22 34 open(adl) do |file| … … 27 39 end 28 40 41 # must "ehr_adls should properly parsed" do 42 # assert_nothing_raised do 43 # @ehr_adls.each do |adl| 44 # puts "Processing #{adl}" 45 # open(adl) do |file| 46 # @parser.parse(file.read, adl) 47 # end 48 # end 49 # end 50 # end 51 52 29 53 end
Note:
See TracChangeset
for help on using the changeset viewer.