From 1e31ffc7c9170255c2a62773ac1e1d90c4991a9d Mon Sep 17 00:00:00 2001 From: Hiroya Fujinami Date: Thu, 13 Jun 2024 23:29:59 +0900 Subject: [PATCH] Fix small typos (#148) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I found these typos with using [`typos-cli`](https://github.com/crate-ci/typos). Now, we can obtain no typo reports from the `typos` command with this configuration (`.typos.toml`): ```toml [files] extend-exclude = [ "*.svg", "*.xml", ] [default.extend-words] # Common variable names in this project. arry = "arry" blok = "blok" eles = "eles" # Incomplete words in test data. caf = "caf" # German words in test data. abl = "abl" # NOTE: It is a part of "Ablüfe". alle = "alle" ist = "ist" technik = "technik" ``` Thank you. --------- Co-authored-by: Olle Jonsson --- test/test_document.rb | 2 +- test/test_light.rb | 2 +- test/test_sax.rb | 2 +- test/xpath/test_base.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_document.rb b/test/test_document.rb index 7fccbacb..2b0a8a73 100644 --- a/test/test_document.rb +++ b/test/test_document.rb @@ -237,7 +237,7 @@ def test_each_recursive document = REXML::Document.new(xml_source) # Node#each_recursive iterates elements only. - # This does not iterate XML declerations, comments, attributes, CDATA sections, etc. + # This does not iterate XML declarations, comments, attributes, CDATA sections, etc. actual_names = [] document.each_recursive do |element| actual_names << element.attributes["name"] diff --git a/test/test_light.rb b/test/test_light.rb index 54b2c52e..c556c978 100644 --- a/test/test_light.rb +++ b/test/test_light.rb @@ -62,7 +62,7 @@ def test_access_child_elements assert_equal( 'c', a[1].name ) end - def test_itterate_over_children + def test_iterate_over_children foo = make_small_document ctr = 0 foo[0].each { ctr += 1 } diff --git a/test/test_sax.rb b/test/test_sax.rb index c2255bf3..8e905f2e 100644 --- a/test/test_sax.rb +++ b/test/test_sax.rb @@ -140,7 +140,7 @@ def test_simple_doctype_listener # test doctype with missing name, should throw ParseException # submitted by Jeff Barczewseki - def test_doctype_with_mising_name_throws_exception + def test_doctype_with_missing_name_throws_exception xml = <<~END diff --git a/test/xpath/test_base.rb b/test/xpath/test_base.rb index 68b33ab7..1dacd69d 100644 --- a/test/xpath/test_base.rb +++ b/test/xpath/test_base.rb @@ -651,7 +651,7 @@ def test_comparisons source = "" doc = REXML::Document.new(source) - # NOTE TO SER: check that number() is required + # NOTE: check that number() is required assert_equal 2, REXML::XPath.match(doc, "//b[number(@id) > 1]").size assert_equal 3, REXML::XPath.match(doc, "//b[number(@id) >= 1]").size assert_equal 1, REXML::XPath.match(doc, "//b[number(@id) <= 1]").size