Cleaned up cliargs script
This commit is contained in:
parent
0a869da1d5
commit
cd34bb182c
2 changed files with 3 additions and 7 deletions
|
@ -1,15 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
MAIN="org.testng.TestNG"
|
java -cp "lib/test/*" org.testng.TestNG 2>/dev/null |\
|
||||||
TMP=/tmp/cliargs
|
|
||||||
|
|
||||||
java -cp "lib/test/*" $MAIN >$TMP 2>/dev/null
|
|
||||||
|
|
||||||
cat $TMP |\
|
|
||||||
grep "^ -.*" |\
|
grep "^ -.*" |\
|
||||||
sed -e "s/ -/-/" -e "s/, -/\n-/" |\
|
sed -e "s/ -/-/" -e "s/, -/\n-/" |\
|
||||||
sed "/testRunFactory/d" |\
|
sed "/testRunFactory/d" |\
|
||||||
sort |\
|
sort |\
|
||||||
sed '$s/,//' > "src/test/resources/testng-args.txt"
|
sed '$s/,//' > "src/test/resources/testng-args.txt"
|
||||||
|
|
||||||
rm -rf $TMP
|
|
||||||
|
|
|
@ -53,6 +53,8 @@ class TestNgOperationTest {
|
||||||
void testCheckAllParameters() throws IOException {
|
void testCheckAllParameters() throws IOException {
|
||||||
var args = Files.readAllLines(Paths.get("src", "test", "resources", "testng-args.txt"));
|
var args = Files.readAllLines(Paths.get("src", "test", "resources", "testng-args.txt"));
|
||||||
|
|
||||||
|
assertThat(args).isNotEmpty();
|
||||||
|
|
||||||
var params = new TestNgOperation()
|
var params = new TestNgOperation()
|
||||||
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", "Examples"))
|
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", "Examples"))
|
||||||
.alwaysRunListeners(true)
|
.alwaysRunListeners(true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue