-
Notifications
You must be signed in to change notification settings - Fork 2
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
add tests #3
Comments
crazy things (CRAN won't like them)
|
Thank god |
It is slightly more complicated than that. CRAN doesn't allow R scripts with non-ASCII characters (unless with compelling reasons). Therefore, one has to do something like this (which is kind-of okay, if there are only a few tests): Another way is to group all non-ASCII tests in one file and then |
I can help with converting the current tests to that form. |
@chainsawriot Sure happy if you can do that \Edit: wait, you already did that, didnt you? |
Yes. #10 But I am in the test department, so I can add more tests. |
can't self assigned, but consider this as self assigned. |
|
* So that we can update ada independently Freshly updated: https://github.com/ada-url/ada/releases/tag/v2.6.8 * Improve header hygiene gesistsa#3
* Separate our code from ada ref #3 * So that we can update ada independently Freshly updated: https://github.com/ada-url/ada/releases/tag/v2.6.8 * Improve header hygiene #3 * Rename hpp to h I've forgotten the CRAN check god doesn't like hpp in `src/`, sorry.
|
Thanks to require(adaR)
#> Loading required package: adaR
corners <- c(NA, NULL, "", "a", 1)
testthat::expect_error(x <- ada_url_parse(corners), NA)
testthat::expect_error(y <- ada_url_parse(corners, decode = FALSE), NA)
x$host
#> [1] "NA" "NA" "NA" "NA"
y$host
#> [1] NA NA NA NA Created on 2023-09-24 with reprex v2.0.2 |
Let me deal with #18 first because I think this could make urldecode superfluous. Not sure yet, but will report back |
@chainsawriot I think this needs to be fixed. What I did in #20 doesnt help with URLdecoding afais. You wanna fix it together with the tests? |
Now it's in a TDD (Test-driven development) mode urls <- rep("http://www.google.com", 3)
adaR::ada_has_credentials(urls) ## ERROR
#> Error in vapply(url, function(x) vapply(url, function(x) Rcpp_ada_has_credentials(x, : values must be length 1,
#> but FUN(X[[1]]) result is length 3
adaR::ada_has_empty_hostname(urls)
#> http://www.google.com http://www.google.com http://www.google.com
#> FALSE FALSE FALSE
urls2 <- c(urls, "abc")
adaR::ada_has_empty_hostname(urls2) ## should this be NA?
#> Error in eval(expr, envir, enclos): input is not a valid url Created on 2023-09-24 with reprex v2.0.2
https://github.com/schochastics/adaR/blob/625ef066b13cd360e39c3c178a4f84e7657b96c6/R/has.R#L9
I will fix 1; let me know your thought on 2. Thank you very much! |
@chainsawriot yes they should probably give |
Yeah. |
The Mozilla test suite is not like what we are doing. |
|
No description provided.
The text was updated successfully, but these errors were encountered: