mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	
							parent
							
								
									992aa2cda5
								
							
						
					
					
						commit
						e954be14d0
					
				
					 3 changed files with 10 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue