From d4c88a9ab2b49a0241f634ecf3205210f00b4ac4 Mon Sep 17 00:00:00 2001 From: Ferronn Date: Sat, 28 Jun 2025 11:10:39 -0400 Subject: [PATCH 1/2] --no-readline on gha --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9dc001f..6da9f8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: - name: setup lua run: | python3 -m pip install hererocks - hererocks -l 5.1 -r 3.5.0 .lua + hererocks -l 5.1 -r 3.5.0 --no-readline .lua eval $(.lua/bin/luarocks path) .lua/bin/luarocks install luacheck .lua/bin/luarocks install busted From b9e647341062ab84a8bc5f578329149fefe792e1 Mon Sep 17 00:00:00 2001 From: Ferronn Date: Sat, 28 Jun 2025 11:14:29 -0400 Subject: [PATCH 2/2] more fixes --- .github/workflows/test.yml | 2 ++ spec/export_spec.lua | 29 ++++++++++++----------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6da9f8b..840522a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: test on: pull_request: push: + branches: + - main jobs: test: runs-on: ubuntu-latest diff --git a/spec/export_spec.lua b/spec/export_spec.lua index 12638d6..55d3408 100644 --- a/spec/export_spec.lua +++ b/spec/export_spec.lua @@ -1,28 +1,23 @@ describe('export', function() it('works', function() local globalenv = { - C_Console = { - GetAllCommands = function() - return { - { command = 'foo' }, - { command = 'bar' }, - { command = 'baz' }, - } - end, - }, + ConsoleGetAllCommands = function() + return { + { command = 'foo' }, + { command = 'bar' }, + { command = 'baz' }, + } + end, C_CVar = { GetCVarDefault = function(arg) return 'default_' .. arg end, }, - CreateFrame = function() - return { - RegisterEvent = function() end, - SetScript = function(_, _, script) - script() - end, - } - end, + C_Timer = { + After = function(_, f) + f() + end, + }, GetBuildInfo = function() return 1, 2, 3, 4 end,