mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-11-27 07:06:54 +01:00
Added new path argument to utils.Exec... test
This commit is contained in:
@@ -11,7 +11,7 @@ func TestExec(t *testing.T) {
|
|||||||
testCommand := "echo"
|
testCommand := "echo"
|
||||||
testArguments := []string{"'Hello World'"}
|
testArguments := []string{"'Hello World'"}
|
||||||
|
|
||||||
result := Exec(testCommand, testArguments)
|
result := Exec("/", testCommand, testArguments)
|
||||||
|
|
||||||
if result != "Hello World" {
|
if result != "Hello World" {
|
||||||
t.Log("Expected 'Hellow World' but got ", result)
|
t.Log("Expected 'Hellow World' but got ", result)
|
||||||
@@ -24,7 +24,7 @@ func TestExecAndGetLines(t *testing.T) {
|
|||||||
testArguments := []string{"$'Line1\nLine2\nLine3'"}
|
testArguments := []string{"$'Line1\nLine2\nLine3'"}
|
||||||
var result []string
|
var result []string
|
||||||
|
|
||||||
scanner := ExecAndGetLines(testCommand, testArguments)
|
scanner := ExecAndGetLines("/", testCommand, testArguments)
|
||||||
|
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
result = append(result, scanner.Text())
|
result = append(result, scanner.Text())
|
||||||
|
|||||||
Reference in New Issue
Block a user