From 0c0a284b18ecb86ec1a1efc71d4a18566f207835 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Thu, 27 Sep 2012 16:59:20 -0400 Subject: Patch 3485071: Fixed _PREMAKE_COMMAND fallback when premake4 is not in PATH (Konstantin Tokarev) --- tests/base/test_premake_command.lua | 14 ++++++++++++++ tests/premake4.lua | 1 + 2 files changed, 15 insertions(+) create mode 100644 tests/base/test_premake_command.lua (limited to 'tests') diff --git a/tests/base/test_premake_command.lua b/tests/base/test_premake_command.lua new file mode 100644 index 0000000..0c29c5f --- /dev/null +++ b/tests/base/test_premake_command.lua @@ -0,0 +1,14 @@ +-- +-- tests/base/test_premake_command.lua +-- Test the initialization of the _PREMAKE_COMMAND global. +-- Copyright (c) 2012 Jason Perkins and the Premake project +-- + + T.premake_command = { } + local suite = T.premake_command + + + function suite.valueIsSet() + local filename = iif(os.is("windows"), "premake4.exe", "premake4") + test.isequal(path.getabsolute("../bin/debug/" .. filename), _PREMAKE_COMMAND) + end diff --git a/tests/premake4.lua b/tests/premake4.lua index ea3a122..a2d0d5f 100644 --- a/tests/premake4.lua +++ b/tests/premake4.lua @@ -51,6 +51,7 @@ dofile("base/test_location.lua") dofile("base/test_os.lua") dofile("base/test_path.lua") + dofile("base/test_premake_command.lua") dofile("base/test_table.lua") dofile("base/test_tree.lua") dofile("tools/test_gcc.lua") -- cgit v1.2.3