mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-17 20:41:01 +01:00
added commandline and stdin tests using testscript (#28)
* added commandline and stdin tests using testscript --------- Co-authored-by: Thomas von Dein <tom@vondein.org>
This commit is contained in:
16
t/cmdlinecalc-lua.txtar
Normal file
16
t/cmdlinecalc-lua.txtar
Normal file
@@ -0,0 +1,16 @@
|
||||
exec testrpn -d -c test.lua 3 5 lower
|
||||
stdout '3\n'
|
||||
|
||||
-- test.lua --
|
||||
function lower(a,b)
|
||||
if a < b then
|
||||
return a
|
||||
else
|
||||
return b
|
||||
end
|
||||
end
|
||||
|
||||
function init()
|
||||
-- expects 2 args
|
||||
register("lower", 2, "lower")
|
||||
end
|
||||
Reference in New Issue
Block a user