libxml2-2.9.9 breaks a test of url_relative()

Đang mở
#316 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
r
Lĩnh vực
testing-qa

Hướng nghiên cứu

Start with xml2::url_relative() and the upstream libxml2 uri.c:xmlBuildRelativePath() behavior; reproduce the mismatch using the R CMD Rscript invocation shown for libxml2 2.9.9. Locate the existing url_relative() test, then adjust its expectation to account for the reported result differences and run that test against relevant libxml2 versions.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Version 2.9.9 of libxml2.so changed uri.c:xmlBuildRelativePath() so that a test in the xml2 package (version 1.3.2) breaks:

url_relative("http://hadley.nz/a/c", "http://hadley.nz/") not equal to "../a/c".
1/1 mismatches
x[1]: "a/c"
y[1]: "../a/c"

I built the last few releases of libxml2 on a Linux box and got the following results.

erratic:bill:315% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.7/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "../a/b/c"
erratic:bill:316% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.8/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "../a/b/c"
erratic:bill:317% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.9/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "a/b/c"
erratic:bill:318% env LD_LIBRARY_PATH=`pwd`/libxml2-2.9.10/.libs:$LD_LIBRARY_PATH R CMD Rscript -e 'xml2::url_relative("http://foo.com/a/b/c", "http://foo.com/")'
[1] "a/b/c"

I think both results are acceptable, although the one without the initial '../' seems better. In any case the test should be omitted or allow both results.

Ngôn ngữ chính
R
Star
227
Fork
86
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của r-lib/xml2

Tất cả issue của r-lib/xml2

Issue tương tự

Thêm issue về R

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.