bluejay 0.0.5

A cross-platform application test script runner.

To use this package, put the following dependency into your project's dependencies section:



Cross-platform test script runner.

Bluejay allows you to write test scripts for command-line applications that run on multiple platforms (currently Windows and Linux), so you don't need to write something in both batch and shell scripts (or worse, leave no or few tests for Windows).

Bluejay embeds a Lua interpreter, with a small test library. The ./test directory also functions as a source of examples.

You can run a single test via bluejay or specify a directory (bluejay ./test) to test all bj files within.

#!/usr/bin/env bluejay

-- Test that bluejay executes a program and reads its standard output.

local ret = Test:run("echo", "asdf")

-- We don't care about the whitespace, which is system-dependent.
assert(Util:strip(ret.Output) == "asdf")
assert(ret.ReturnCode == 0)

-- We can also make the assertion based on the host operating system.
if (System.OS == "Windows") then
	assert(ret.Output == "asdf\r\n")
	assert(ret.Output == "asdf\n")
#!/usr/bin/env bluejay

-- Test that Util:writeFile() writes text to the filesystem.

-- cleanup() will run once the test finishes, regardless of success or failure.
function cleanup()

-- Note: If path is declared as local, the cleanup function won't see it.
path = Util:getTempFile()
Util:writeFile(path, "This is some text.")
local text = Util:readFile(path)

assert(text == "This is some text.")
  • Ryan Frame
luad, tested
0.0.5 2017-Aug-11
0.0.4 2017-Aug-02
0.0.2 2017-Aug-02
0.0.1 2017-Jul-31
~master 2018-Jan-17
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 8 downloads total

Short URL: