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

stri_sprintf is platform-dependent #444

Open
gagolews opened this issue Jul 14, 2021 · 0 comments
Open

stri_sprintf is platform-dependent #444

gagolews opened this issue Jul 14, 2021 · 0 comments

Comments

@gagolews
Copy link
Owner

macOS-latest (release) yields:

----- FAILED[data]: test-sprintf.R<25--25>
 call| expect_identical(outer(f, x, stri_sprintf, na_string = "NA"), 
 call| -->    outer(f, x, sprintf))
 diff| 4 string mismatches
 ----- FAILED[data]: test-sprintf.R<203--203>
 call| expect_identical(stri_sprintf("%08s", "abc"), sprintf("%08s", 
 call| -->    "abc"))
 diff| Expected '00000abc', got '     abc'

windows-latest (3.6):

----- FAILED[data]: test-sprintf.R<18--19>
 call| expect_identical(stri_sprintf("%0000000000000000001$#0+ *0000002$.*003$e", 
 call| -->    1.23456, -12, 3), sprintf("%#0+-12.3e", 1.23456))
 diff| Expected '+1.235e+00  ', got '+1.235e+000 '
 ----- FAILED[data]: test-sprintf.R<20--21>
 call| expect_identical(stri_sprintf("%0000000000000000001$#0+ *0000002$.*003$e", 
 call| -->    1.23456, 12, 3), sprintf("%#0+12.3e", 1.23456))
 diff| Expected '+001.235e+00', got '+01.235e+000'
 ----- FAILED[data]: test-sprintf.R<228--228>
 call| expect_identical(stri_sprintf("%e", pi), sprintf("%e", pi))
 diff| Expected '3.141593e+00', got '3.141593e+000'
 ----- FAILED[data]: test-sprintf.R<229--229>
 call| expect_identical(stri_sprintf("%E", pi), sprintf("%E", pi))
 diff| Expected '3.141593E+00', got '3.141593E+000'
 ----- FAILED[data]: test-sprintf.R<231--231>
 call| expect_identical(stri_sprintf("%g", 1e+06 * pi), sprintf("%g", 
 call| -->    1e+06 * pi))
 diff| Expected '3.14159e+06', got '3.14159e+006'
There were 50 or more warnings (use warnings() to see the first 50)
 ----- FAILED[data]: test-sprintf.R<233--233>
 call| expect_identical(stri_sprintf("%G", 1e-06 * pi), sprintf("%G", 
 call| -->    1e-06 * pi))
 diff| Expected '3.14159E-06', got '3.14159E-006'
 ----- FAILED[data]: test-sprintf.R<243--243>
 call| expect_identical(stri_sprintf("%a", seq(0, 1, 0.1)), sprintf("%a", 
 call| -->    seq(0, 1, 0.1)))
 diff| 10 string mismatches
 ----- FAILED[data]: test-sprintf.R<244--244>
 call| expect_identical(stri_sprintf("%a", c(0, 0.1, 0.2, 0.3, 0.4, 
 call| -->    0.5, 0.6, 0.7, 0.8, 0.9, 1)), sprintf("%a", c(0, 0.1, 0.2, 
 call| -->    0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)))
 diff| 10 string mismatches

windows-latest (release):

----- FAILED[data]: test-sprintf.R<243--243>
 call| expect_identical(stri_sprintf("%a", seq(0, 1, 0.1)), sprintf("%a", 
 call| -->    seq(0, 1, 0.1)))
 diff| 10 string mismatches
 ----- FAILED[data]: test-sprintf.R<244--244>
 call| expect_identical(stri_sprintf("%a", c(0, 0.1, 0.2, 0.3, 0.4, 
 call| -->    0.5, 0.6, 0.7, 0.8, 0.9, 1)), sprintf("%a", c(0, 0.1, 0.2, 
 call| -->    0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)))
 diff| 10 string mismatches
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

1 participant