Bug: 'string.concat' error message uses wrong format

This commit is contained in:
Roberto Ierusalimschy
2021-02-15 13:31:45 -03:00
parent 38cc7d40a4
commit c03c527fd2
2 changed files with 4 additions and 1 deletions

View File

@@ -361,6 +361,9 @@ assert(load("return 1\n--comment without ending EOL")() == 1)
checkerror("table expected", table.concat, 3)
checkerror("at index " .. maxi, table.concat, {}, " ", maxi, maxi)
-- '%' escapes following minus signal
checkerror("at index %" .. mini, table.concat, {}, " ", mini, mini)
assert(table.concat{} == "")
assert(table.concat({}, 'x') == "")
assert(table.concat({'\0', '\0\1', '\0\1\2'}, '.\0.') == "\0.\0.\0\1.\0.\0\1\2")