| Line | |
|---|
| 1 | --
|
|---|
| 2 | -- tests/test_premake.lua
|
|---|
| 3 | -- Automated test suite for the Premake support functions.
|
|---|
| 4 | -- Copyright (c) 2008-2015 Jason Perkins and the Premake project
|
|---|
| 5 | --
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | local suite = test.declare("premake")
|
|---|
| 9 |
|
|---|
| 10 | local p = premake
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | --
|
|---|
| 14 | -- Setup
|
|---|
| 15 | --
|
|---|
| 16 |
|
|---|
| 17 | local wks, prj
|
|---|
| 18 | function suite.setup()
|
|---|
| 19 | wks = test.createWorkspace()
|
|---|
| 20 | location "MyLocation"
|
|---|
| 21 | prj = p.workspace.getproject(wks, 1)
|
|---|
| 22 | end
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | --
|
|---|
| 26 | -- generate() tests
|
|---|
| 27 | --
|
|---|
| 28 |
|
|---|
| 29 | function suite.generate_OpensCorrectFile()
|
|---|
| 30 | p.generate(prj, ".prj", function () end)
|
|---|
| 31 | test.openedfile(path.join(os.getcwd(), "MyLocation/MyProject.prj"))
|
|---|
| 32 | end
|
|---|
| 33 |
|
|---|
| 34 | function suite.generate_ClosesFile()
|
|---|
| 35 | p.generate(prj, ".prj", function () end)
|
|---|
| 36 | test.closedfile(true)
|
|---|
| 37 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.