mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 22:34:09 +02:00
Added test for removing project
This commit is contained in:
parent
833b4002a5
commit
ddd221c187
5 changed files with 45 additions and 0 deletions
6
IDE/Tests/BugW003/BeefProj.toml
Normal file
6
IDE/Tests/BugW003/BeefProj.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FileVersion = 1
|
||||||
|
Dependencies = {corlib = "*", SDL2 = "*"}
|
||||||
|
|
||||||
|
[Project]
|
||||||
|
Name = "Bug"
|
||||||
|
StartupObject = "Bug.Program"
|
5
IDE/Tests/BugW003/BeefSpace.toml
Normal file
5
IDE/Tests/BugW003/BeefSpace.toml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FileVersion = 1
|
||||||
|
Projects = {Bug = {Path = "."}, SDL2 = "*"}
|
||||||
|
|
||||||
|
[Workspace]
|
||||||
|
StartupProject = "Bug"
|
14
IDE/Tests/BugW003/scripts/Test.txt
Normal file
14
IDE/Tests/BugW003/scripts/Test.txt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# This test ensures we can remove a project, properly fail, and then compile without it
|
||||||
|
|
||||||
|
ShowFile("src/Program.bf")
|
||||||
|
Compile()
|
||||||
|
|
||||||
|
RemoveProject("SDL2")
|
||||||
|
|
||||||
|
WaitForResolve()
|
||||||
|
SleepTicks(20)
|
||||||
|
AssertFileErrors()
|
||||||
|
|
||||||
|
ToggleCommentAt("Main_Start")
|
||||||
|
|
||||||
|
Compile()
|
16
IDE/Tests/BugW003/src/Program.bf
Normal file
16
IDE/Tests/BugW003/src/Program.bf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#pragma warning disable 168
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Bug
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
//*Main_Start
|
||||||
|
SDL2.gApp = null; //FAIL
|
||||||
|
/*@*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,6 +39,10 @@ PUSHD %~dp0..\
|
||||||
@CALL :TEST
|
@CALL :TEST
|
||||||
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
||||||
|
|
||||||
|
@SET TESTPATH=IDE\Tests\BugW003
|
||||||
|
@CALL :TEST
|
||||||
|
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
||||||
|
|
||||||
@SET TESTPATH=IDE\Tests\IndentTest
|
@SET TESTPATH=IDE\Tests\IndentTest
|
||||||
@CALL :TEST
|
@CALL :TEST
|
||||||
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
@IF !ERRORLEVEL! NEQ 0 GOTO HADERROR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue