Move test projects out of server folder

This commit is contained in:
Lucien Greathouse
2018-08-13 15:35:04 -07:00
parent ef0d1e7cec
commit c6982f70b4
19 changed files with 12 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
#[macro_use] extern crate lazy_static;
extern crate rouille; extern crate rouille;
extern crate serde_json; extern crate serde_json;
extern crate serde; extern crate serde;
@@ -22,13 +24,17 @@ use librojo::{
rbx::RbxValue, rbx::RbxValue,
}; };
#[test] lazy_static! {
fn empty() { static ref TEST_PROJECTS_ROOT: PathBuf = {
let original_project_path = {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("test-projects/empty"); path.push("../test-projects");
path path
}; };
}
#[test]
fn empty() {
let original_project_path = TEST_PROJECTS_ROOT.join("empty");
let project_tempdir = tempfile::tempdir().unwrap(); let project_tempdir = tempfile::tempdir().unwrap();
let project_path = project_tempdir.path(); let project_path = project_tempdir.path();
@@ -72,11 +78,7 @@ fn empty() {
#[test] #[test]
fn one_partition() { fn one_partition() {
let original_project_path = { let original_project_path = TEST_PROJECTS_ROOT.join("one-partition");
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("test-projects/one-partition");
path
};
let project_tempdir = tempfile::tempdir().unwrap(); let project_tempdir = tempfile::tempdir().unwrap();
let project_path = project_tempdir.path(); let project_path = project_tempdir.path();
@@ -394,11 +396,7 @@ fn one_partition() {
#[test] #[test]
fn partition_to_file() { fn partition_to_file() {
let original_project_path = { let original_project_path = TEST_PROJECTS_ROOT.join("partition-to-file");
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("test-projects/partition-to-file");
path
};
let project_tempdir = tempfile::tempdir().unwrap(); let project_tempdir = tempfile::tempdir().unwrap();
let project_path = project_tempdir.path(); let project_path = project_tempdir.path();

View File

@@ -1,14 +0,0 @@
{
"name": "test-project",
"servePort": 34872,
"partitions": {
"src": {
"path": "src",
"target": "ReplicatedFirst"
},
"extra": {
"path": "extra-script.lua",
"target": "ReplicatedStorage.ExtraScript"
}
}
}

View File

@@ -1 +0,0 @@
print("Hello, world, from my tool!")

View File

@@ -1,4 +0,0 @@
{
"Name": "SomeTool",
"ClassName": "Tool"
}

View File

@@ -1 +0,0 @@
print("HEY!")

View File

@@ -1 +0,0 @@
-- bar.client.lua

View File

@@ -1 +0,0 @@
-- foo.server.lua

View File

@@ -1,20 +0,0 @@
{
"Name": "hello",
"ClassName": "Model",
"Children": [
{
"Name": "Some Part",
"ClassName": "Part"
},
{
"Name": "Some StringValue",
"ClassName": "StringValue",
"Properties": {
"Value": {
"Type": "String",
"Value": "Hello, world!"
}
}
}
]
}

View File

@@ -1 +0,0 @@
-- meh/x.lua

View File

@@ -1 +0,0 @@
-- test.lua