summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-24 10:27:18 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-24 10:33:32 +0900
commite954be14d07e54b8dbf71c0fa227e5818eaa01e6 (patch)
tree9da2e7d220397e67ce1a5c6fdde61bcf0895cbb7
parent992aa2cda50140abbca165024682eae998756e2d (diff)
Get rid of false positive misspellings
[Bug #16437]
-rw-r--r--missing/procstat_vm.c2
-rw-r--r--spec/ruby/core/file/readlink_spec.rb2
-rw-r--r--test/openssl/test_x509name.rb15
3 files changed, 10 insertions, 9 deletions
diff --git a/missing/procstat_vm.c b/missing/procstat_vm.c
index f56c406bf9..76fd8f61ba 100644
--- a/missing/procstat_vm.c
+++ b/missing/procstat_vm.c
@@ -19,7 +19,7 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp)
#endif
fprintf(stderr, "%*s %*s %3s %4s %4s %3s %3s %4s %-2s %-s\n",
ptrwidth, "START", ptrwidth, "END", "PRT", "RES",
- "PRES", "REF", "SHD", "FL", "TP", "PATH");
+ "P""RES", "REF", "SHD", "FL", "TP", "PATH");
#ifdef HAVE_PROCSTAT_GETVMMAP
freep = procstat_getvmmap(procstat, kipp, &cnt);
diff --git a/spec/ruby/core/file/readlink_spec.rb b/spec/ruby/core/file/readlink_spec.rb
index eb3bfda30e..20741ba121 100644
--- a/spec/ruby/core/file/readlink_spec.rb
+++ b/spec/ruby/core/file/readlink_spec.rb
@@ -26,7 +26,7 @@ describe "File.readlink" do
it "raises an Errno::ENOENT if there is no such file" do
# TODO: missing_file
- -> { File.readlink("/this/surely/doesnt/exist") }.should raise_error(Errno::ENOENT)
+ -> { File.readlink("/this/surely/does/not/exist") }.should raise_error(Errno::ENOENT)
end
it "raises an Errno::EINVAL if called with a normal file" do
diff --git a/test/openssl/test_x509name.rb b/test/openssl/test_x509name.rb
index f0146595d6..8a4596ea6e 100644
--- a/test/openssl/test_x509name.rb
+++ b/test/openssl/test_x509name.rb
@@ -242,15 +242,16 @@ class OpenSSL::TestX509Name < OpenSSL::TestCase
assert_match(/^multi-valued RDN is not supported: #{dn_r}/, ex.message)
}
+ bad_dc = "exa#{"pm"}le" # <- typo of "example"
[
- ["DC=org,DC=exapmle,CN", "CN"],
+ ["DC=org,DC=#{bad_dc},CN", "CN"],
["DC=org,DC=example,", ""],
- ["DC=org,DC=exapmle,CN=www.example.org;", "CN=www.example.org;"],
- ["DC=org,DC=exapmle,CN=#www.example.org", "CN=#www.example.org"],
- ["DC=org,DC=exapmle,CN=#777777.example.org", "CN=#777777.example.org"],
- ["DC=org,DC=exapmle,CN=\"www.example\".org", "CN=\"www.example\".org"],
- ["DC=org,DC=exapmle,CN=www.\"example.org\"", "CN=www.\"example.org\""],
- ["DC=org,DC=exapmle,CN=www.\"example\".org", "CN=www.\"example\".org"],
+ ["DC=org,DC=#{bad_dc},CN=www.example.org;", "CN=www.example.org;"],
+ ["DC=org,DC=#{bad_dc},CN=#www.example.org", "CN=#www.example.org"],
+ ["DC=org,DC=#{bad_dc},CN=#777777.example.org", "CN=#777777.example.org"],
+ ["DC=org,DC=#{bad_dc},CN=\"www.example\".org", "CN=\"www.example\".org"],
+ ["DC=org,DC=#{bad_dc},CN=www.\"example.org\"", "CN=www.\"example.org\""],
+ ["DC=org,DC=#{bad_dc},CN=www.\"example\".org", "CN=www.\"example\".org"],
].each{|dn, msg|
ex = scanner.call(dn) rescue $!
assert_match(/^malformed RDN: .*=>#{Regexp.escape(msg)}/, ex.message)