aboutsummaryrefslogtreecommitdiff
path: root/spec/04-term_helper.lua
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2024-03-24 15:02:15 +0100
committerGitHub <noreply@github.com>2024-03-24 15:02:15 +0100
commit47c24eed0191f8f72646be63dee94ac2b35eb062 (patch)
tree808fc02c608fd56e93cd502069adcba9c561df7d /spec/04-term_helper.lua
parent8fe13074a7d9fdd88c5423d1e9c5fcc4ec43a57b (diff)
downloadluasystem-47c24eed0191f8f72646be63dee94ac2b35eb062.tar.gz
luasystem-47c24eed0191f8f72646be63dee94ac2b35eb062.tar.bz2
luasystem-47c24eed0191f8f72646be63dee94ac2b35eb062.zip
chore(test): add tests (manual) for isatty terminal function (#22)
Diffstat (limited to 'spec/04-term_helper.lua')
-rw-r--r--spec/04-term_helper.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/04-term_helper.lua b/spec/04-term_helper.lua
new file mode 100644
index 0000000..7fd39d2
--- /dev/null
+++ b/spec/04-term_helper.lua
@@ -0,0 +1,13 @@
1-- sub-script executed for isatty test
2local writefile = require("pl.utils").writefile
3local isatty = require("system").isatty
4assert(arg[1] == "--", "missing -- argument")
5local tempfile = assert(arg[2], "missing tempfile argument")
6
7-- print("my temp file: ", tempfile)
8
9assert(writefile(tempfile, [[{
10 stdin = ]]..tostring(isatty(io.stdin))..[[,
11 stdout = ]]..tostring(isatty(io.stdout))..[[,
12 stderr = ]]..tostring(isatty(io.stderr))..[[,
13}]]))