aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/test/pipe_spec.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
commitf1454bbbd13a71da2005ff789cde2da0e9eb81f6 (patch)
tree37131187f4218dd3ebec049101c28a161e7ca289 /spec/outputs/test/pipe_spec.lua
parent604a8e5e53cdc7391a502fcabf07e8f1cc2a778c (diff)
downloadyuescript-main.tar.gz
yuescript-main.tar.bz2
yuescript-main.zip
Adding tests.HEADmain
Diffstat (limited to '')
-rw-r--r--spec/outputs/test/pipe_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/outputs/test/pipe_spec.lua b/spec/outputs/test/pipe_spec.lua
new file mode 100644
index 0000000..3d797ed
--- /dev/null
+++ b/spec/outputs/test/pipe_spec.lua
@@ -0,0 +1,13 @@
1return describe("pipe", function()
2 return it("pipes through functions", function()
3 local f
4 f = function(x)
5 return x + 1
6 end
7 local g
8 g = function(x)
9 return x * 2
10 end
11 return assert.same((g(f(3))), 8)
12 end)
13end)