aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-29 00:49:41 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-29 00:49:41 +0800
commit022d4298a7d92912282c62852d76b9b50dce86ad (patch)
treeeeb6e2508e5ab69be5f5054112c3bcde81f5d94a
parentdd64edd58fe25ec74ae5958128cf3f74b0692f3b (diff)
downloadyuescript-022d4298a7d92912282c62852d76b9b50dce86ad.tar.gz
yuescript-022d4298a7d92912282c62852d76b9b50dce86ad.tar.bz2
yuescript-022d4298a7d92912282c62852d76b9b50dce86ad.zip
Fixed Windows build.
-rw-r--r--.github/workflows/windows.yml10
-rw-r--r--spec/inputs/test/advanced_macro_spec.yue2
-rw-r--r--spec/outputs/test/advanced_macro_spec.lua2
3 files changed, 12 insertions, 2 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 9cd09fc..5f65181 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -40,6 +40,16 @@ jobs:
40 bin\windows\x64\Debug\yue.exe spec\inputs\test\try_catch_spec.yue -o spec\generated\5.1\test\try_catch_spec.lua --target=5.1 40 bin\windows\x64\Debug\yue.exe spec\inputs\test\try_catch_spec.yue -o spec\generated\5.1\test\try_catch_spec.lua --target=5.1
41 bin\windows\x64\Debug\yue.exe -e spec/inputs/compile_doc.yue spec/generated 41 bin\windows\x64\Debug\yue.exe -e spec/inputs/compile_doc.yue spec/generated
42 bin\windows\x64\Debug\yue.exe -e "io.popen('git diff --no-index spec\\outputs spec\\generated')\read('*a') |> ((r)-> r ~= '' and (print(r) or os.exit 1))" 42 bin\windows\x64\Debug\yue.exe -e "io.popen('git diff --no-index spec\\outputs spec\\generated')\read('*a') |> ((r)-> r ~= '' and (print(r) or os.exit 1))"
43 - name: Setup MSVC dev cmd
44 uses: ilammy/msvc-dev-cmd@v1
45 - name: Setup Lua
46 uses: leafo/gh-actions-lua@v12
47 - name: Setup LuaRocks
48 uses: leafo/gh-actions-luarocks@v6
49 - name: Install and run busted
50 run: |
51 luarocks install busted
52 busted
43 - name: pack 53 - name: pack
44 if: startsWith(github.ref, 'refs/tags/') 54 if: startsWith(github.ref, 'refs/tags/')
45 run: | 55 run: |
diff --git a/spec/inputs/test/advanced_macro_spec.yue b/spec/inputs/test/advanced_macro_spec.yue
index d88807f..9b9c4de 100644
--- a/spec/inputs/test/advanced_macro_spec.yue
+++ b/spec/inputs/test/advanced_macro_spec.yue
@@ -70,7 +70,7 @@ describe "advanced macro", ->
70 70
71 it "should work with builtin FILE macro", -> 71 it "should work with builtin FILE macro", ->
72 macro file_test = -> 72 macro file_test = ->
73 "$FILE" 73 "'#{$FILE}'"
74 74
75 result = $file_test 75 result = $file_test
76 assert.is_true type(result) == "string" 76 assert.is_true type(result) == "string"
diff --git a/spec/outputs/test/advanced_macro_spec.lua b/spec/outputs/test/advanced_macro_spec.lua
index 0a46978..12ea559 100644
--- a/spec/outputs/test/advanced_macro_spec.lua
+++ b/spec/outputs/test/advanced_macro_spec.lua
@@ -40,7 +40,7 @@ multiline_var = "test work"
40 return assert.same(result, 10) 40 return assert.same(result, 10)
41 end) 41 end)
42 it("should work with builtin FILE macro", function() 42 it("should work with builtin FILE macro", function()
43 local result = "./spec/inputs/test/advanced_macro_spec.yue" 43 local result = '=(macro file_test)'
44 return assert.is_true(type(result) == "string") 44 return assert.is_true(type(result) == "string")
45 end) 45 end)
46 it("should work with builtin LINE macro", function() 46 it("should work with builtin LINE macro", function()