summaryrefslogtreecommitdiff
path: root/tests/test-suite/strings.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-suite/strings.js')
-rw-r--r--tests/test-suite/strings.js42
1 files changed, 22 insertions, 20 deletions
diff --git a/tests/test-suite/strings.js b/tests/test-suite/strings.js
index 033b324..a0d057c 100644
--- a/tests/test-suite/strings.js
+++ b/tests/test-suite/strings.js
@@ -4,8 +4,10 @@ const test = require('tape');
global.WEB = false;
-const lauxlib = require("../../src/lauxlib.js");
-const lua = require('../../src/lua.js');
+const lua = require('../../src/lua.js');
+const lauxlib = require('../../src/lauxlib.js');
+const lualib = require('../../src/lualib.js');
+
const checkerror = `
local maxi, mini = math.maxinteger, math.mininteger
@@ -43,7 +45,7 @@ test('[test-suite] strings: string comparisons', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -85,7 +87,7 @@ test('[test-suite] strings: string.sub', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -123,7 +125,7 @@ test('[test-suite] strings: string.find', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -155,7 +157,7 @@ test('[test-suite] strings: string.len and #', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -212,7 +214,7 @@ test('[test-suite] strings: string.byte/string.char', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -249,7 +251,7 @@ test('[test-suite] strings: repetitions with separator', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -301,7 +303,7 @@ test('[test-suite] strings: tostring', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -348,7 +350,7 @@ test('[test-suite] strings: string.format', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -389,7 +391,7 @@ test('[test-suite] strings: %q', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -416,7 +418,7 @@ test('[test-suite] strings: embedded zeros error', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -459,7 +461,7 @@ test('[test-suite] strings: format x tostring', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -496,7 +498,7 @@ test('[test-suite] strings: longest number that can be formatted', function (t)
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -545,7 +547,7 @@ test('[test-suite] strings: large numbers for format', function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -602,7 +604,7 @@ test("[test-suite] strings: 'format %a %A'", function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -642,7 +644,7 @@ test("[test-suite] strings: errors in format", function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -693,7 +695,7 @@ test("[test-suite] strings: table.concat", function (t) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -750,7 +752,7 @@ if (false) {
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));
@@ -782,7 +784,7 @@ test("[test-suite] strings: bug in Lua 5.3.2: 'gmatch' iterator does not work ac
L = lauxlib.luaL_newstate();
- lauxlib.luaL_openlibs(L);
+ lualib.luaL_openlibs(L);
lauxlib.luaL_loadstring(L, lua.to_luastring(checkerror + luaCode));