This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
WebFreak001
committed
Aug 12, 2017
1 parent
704a60c
commit a9d70a5
Showing
14 changed files
with
103 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,6 @@ | |
"dfmt": "~>0.5.0" | ||
}, | ||
"subPackages": [ | ||
"./test", | ||
"./test/library", | ||
"./installer", | ||
"./dml" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*/test-* | ||
testout.txt |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
RED="\033[31m" | ||
GREEN="\033[32m" | ||
YELLOW="\033[33m" | ||
NORMAL="\033[0m" | ||
|
||
COMPILER="$1" | ||
|
||
fail_count=0 | ||
pass_count=0 | ||
|
||
echo "Running tests with ${COMPILER}..." | ||
|
||
for testCase in tc*; do | ||
cd $testCase | ||
|
||
dub --compiler="${COMPILER}" >testout.txt 2>&1 | ||
if [[ $? -eq 0 ]]; then | ||
echo -e "${YELLOW}$socket:$testCase:${NORMAL} ... ${GREEN}Pass${NORMAL}"; | ||
let pass_count=pass_count+1 | ||
else | ||
echo -e "${YELLOW}$socket:$testCase:${NORMAL} ... ${RED}Fail${NORMAL}"; | ||
cat testout.txt | ||
let fail_count=fail_count+1 | ||
fi | ||
|
||
cd - > /dev/null; | ||
done | ||
|
||
if [[ $fail_count -eq 0 ]]; then | ||
echo -e "${GREEN}${pass_count} tests passed and ${fail_count} failed.${NORMAL}" | ||
else | ||
echo -e "${RED}${pass_count} tests passed and ${fail_count} failed.${NORMAL}" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name "test-dub" | ||
|
||
dependency "workspace-d" path="../.." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import std.file; | ||
import std.string; | ||
|
||
import workspaced.api; | ||
import workspaced.coms; | ||
|
||
void main() | ||
{ | ||
dub.startup(getcwd); | ||
scope (exit) | ||
dub.stop(); | ||
dub.upgrade(); | ||
assert(dub.dependencies.length > 2); | ||
assert(dub.rootDependencies == ["workspace-d"]); | ||
assert(dub.imports.length > 5); | ||
assert(dub.stringImports[0].endsWith("views") | ||
|| dub.stringImports[0].endsWith("views/") || dub.stringImports[0].endsWith("views\\")); | ||
assert(dub.fileImports.length > 10); | ||
assert(dub.configurations.length == 2); | ||
assert(dub.buildTypes.length); | ||
assert(dub.configuration == "application"); | ||
assert(dub.archTypes.length); | ||
assert(dub.archType.length); | ||
assert(dub.buildType == "debug"); | ||
assert(dub.compiler.length); | ||
assert(dub.name == "test-dub"); | ||
assert(dub.path.toString.endsWith("tc_dub") | ||
|| dub.path.toString.endsWith("tc_dub/") || dub.path.toString.endsWith("tc_dub\\")); | ||
assert(syncBlocking!(dub.build).array.length == 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name "test-fsworkspace" | ||
|
||
dependency "workspace-d" path="../.." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import std.file; | ||
import std.string; | ||
|
||
import workspaced.api; | ||
import workspaced.coms; | ||
|
||
void main() | ||
{ | ||
assert(importPathProvider().length == 0); | ||
fsworkspace.start(getcwd); | ||
fsworkspace.addImports(["source"]); | ||
assert(importPathProvider() == [getcwd, "source"]); | ||
fsworkspace.stop(); | ||
assert(importPathProvider().length == 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name "test-dfmt" | ||
|
||
dependency "workspace-d" path="../.." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import std.file; | ||
import std.string; | ||
|
||
import workspaced.api; | ||
import workspaced.coms; | ||
|
||
void main() | ||
{ | ||
assert(syncBlocking!(dfmt.format)("void main(){}").str.splitLines.length > 1); | ||
} |
This file was deleted.
Oops, something went wrong.