1 -- test code for Lua<->DFUI binding.
2 -- $Id: commands.lua,v 1.16 2005/02/18 04:30:49 cpressey Exp $
8 name = "Command-execution test program",
9 logfile = "cmdtest.log",
16 -- App.option.fake_execution = true
21 { cmdline = "touch /tmp/testing" },
22 { cmdline = "sleep 5", desc = "We're waiting five seconds..." },
23 { cmdline = "ls -la /tmp/", capture = "ls" }
27 print("cc:preview()=",r)
30 print("cc:execute()=",r)
32 r = cc:get_output("ls")
33 print("cc:get_output(ls)=", r)
38 print("*** writing command chain as script to stdout ***")
40 print("*** command chain script written to stdout ***")
42 r = CmdChain.new("echo 'hi'", "echo 'there'"):execute()
43 print("cc:execute()=",r)