Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwanted space in tests/tc_curl_easy.rb? (line 24) #405

Closed
boutil opened this issue Jan 22, 2020 · 1 comment
Closed

unwanted space in tests/tc_curl_easy.rb? (line 24) #405

boutil opened this issue Jan 22, 2020 · 1 comment

Comments

@boutil
Copy link

boutil commented Jan 22, 2020

Hi,

I am wondering if the test test_curlopt_stderr_with_file(TestCurbCurlEasy) in tests/tc_cur_easy.rb has not an unwanted extra space at the end of the first the matching regexp

assert_match('HTTP/1.1 200 OK ', output)

This test, which was passing before in Debian with previous Ruby version, is now failing with ruby2.7, as the space has been removed.

Loaded suite tests/tc_curl_easy
Started
..................F
========================================================================================================================================
     21:     end
     22:     output = File.read(path)
     23: 
  => 24:     assert_match('HTTP/1.1 200 OK ', output)
     25:     assert_match('Host: 127.0.0.1:9129', output)
     26:   end
     27: 
tests/tc_curl_easy.rb:24:in `test_curlopt_stderr_with_file'
Failure: test_curlopt_stderr_with_file(TestCurbCurlEasy):
  </HTTP\/1\.1\ 200\ OK\ /> was expected to be =~
  <"*   Trying 127.0.0.1:9129...\n" +
  "* TCP_NODELAY set\n" +
  "* Connected to 127.0.0.1 (127.0.0.1) port 9129 (#0)\n" +
  "> GET /methods HTTP/1.1\r\n" +
  "Host: 127.0.0.1:9129\r\n" +
  "Accept: */*\r\n" +
  "\r\n" +
  "* Mark bundle as not supporting multiuse\n" +
  "< HTTP/1.1 200 OK\r\n" +
  "< Content-Type: text/plain\r\n" +
  "< Server: WEBrick/1.6.0 (Ruby/2.7.0/2019-12-25)\r\n" +
  "< Date: Wed, 22 Jan 2020 16:59:08 GMT\r\n" +
  "< Content-Length: 3\r\n" +
  "< Connection: Keep-Alive\r\n" +
  "< \r\n" +
  "* Connection #0 to host 127.0.0.1 left intact\n">.

the test test_curlopt_stderr_with_io below in the same file has the same regexp matches without the extra space.

Cheers,

Cédric

@taf2
Copy link
Owner

taf2 commented Nov 3, 2020

This should be fixed now with #408

@taf2 taf2 closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants