This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/tests/actions/make/test_make_tovar.lua
2012-07-24 16:54:11 -04:00

36 lines
640 B
Lua

--
-- tests/actions/make/test_make_tovar.lua
-- Test translation of strings to make variable names.
-- Copyright (c) 2012 Jason Perkins and the Premake project
--
T.make_tovar = { }
local suite = T.make_tovar
local make = premake.make
--
-- Convert spaces to underscores.
--
function suite.removesSpaces()
test.isequal("My_Project", make.tovar("My Project"))
end
--
-- Convert dashes to underscores.
--
function suite.removesDashes()
test.isequal("My_Project", make.tovar("My-Project"))
end
--
-- Remove parenthesis.
--
function suite.removesDashes()
test.isequal("MyProject_x86", make.tovar("MyProject (x86)"))
end