summaryrefslogtreecommitdiff
path: root/tests/test-suite/strings.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-11 14:02:23 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-11 15:19:18 +1000
commite7cf17565e26dc5c4a100688526b0dfed1220e44 (patch)
treeee4606b23f9c62ecf0e6da20dcbf0472d5339fd9 /tests/test-suite/strings.js
parentbe3f9810115cbaded69be37ebc3d088ee252a225 (diff)
downloadfengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.tar.gz
fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.tar.bz2
fengari-e7cf17565e26dc5c4a100688526b0dfed1220e44.zip
Move luaL_openlibs from lauxlib to lualib
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));