locale-related tests aren't guarded by _port in testes/literals.lua

"'Yao Zi' via lua-l" <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <acZa12Yc0fcTOenr@pie>
Hi list,

I'm experimenting with Lua tests shipped along with Lua Git
repository[1], and found a failure in literals.lua,

	.../lua: literals.lua:300: assertion failed!
	stack traceback:
		[C]: in global 'assert'
		literals.lua:300: in main chunk
		[C]: in local 'olddofile'
		all.lua:171: in main chunk
		[C]: in ?
	.>>> closing state <<<

and literals.lua:300 looks like

	-- testing decimal point locale
	if os.setlocale("pt_BR") or os.setlocale("ptb") then
	  assert(tonumber("3,4") == 3.4 and tonumber"3.4" == 3.4)
	  assert(tonumber("  -.4  ") == -0.4)

Since I'm running the test on a musl-libc system which doesn't have full
support for locale-related stuff, I've passed -e '_port=true' when
invoking Lua interpreter to test portable behaviors only. While this
parameter correctly disables non-portable tests related to locales in
strings.lua, it doesn't seem to disable such stuff in literals.lua.

Is it intended or a mistake to leave the locale-related test in
literals.lua unguarded? Thanks for the explanation.

Regards,
Yao Zi

[1]: https://github.com/lua/lua/

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/acZa12Yc0fcTOenr%40pie.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.