-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add tests for --with-disabled in 'print' and 'value' command
- Loading branch information
Showing
9 changed files
with
76 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
active="world" | ||
#disabled="true" |
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 @@ | ||
--no-color | ||
--with-disabled |
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,13 @@ | ||
-------------------------------------------------------------------------------- | ||
- Output of command from line 1 in [tests/with-disabled.run]: | ||
- [print --no-color] | ||
-------------------------------------------------------------------------------- | ||
|
||
(no output to stderr) | ||
|
||
-------------------------------------------------------------------------------- | ||
- Output of command from line 2 in [tests/with-disabled.run]: | ||
- [print --with-disabled] | ||
-------------------------------------------------------------------------------- | ||
|
||
(no output to stderr) |
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,16 @@ | ||
-------------------------------------------------------------------------------- | ||
- Output of command from line 1 in [tests/with-disabled.run]: | ||
- [print --no-color] | ||
-------------------------------------------------------------------------------- | ||
|
||
active="world" | ||
|
||
|
||
-------------------------------------------------------------------------------- | ||
- Output of command from line 2 in [tests/with-disabled.run]: | ||
- [print --with-disabled] | ||
-------------------------------------------------------------------------------- | ||
|
||
active="world" | ||
#disabled="true" | ||
|
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 @@ | ||
#disabled="my-value" |
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 @@ | ||
disabled | ||
disabled --with-disabled |
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,14 @@ | ||
-------------------------------------------------------------------------------- | ||
- Output of command from line 1 in [tests/with-disabled.run]: | ||
- [value disabled] | ||
-------------------------------------------------------------------------------- | ||
|
||
Error: Key [ disabled ] exists, but is commented out - use [--with-disabled] to include it | ||
Run 'dottie value --help' for usage. | ||
|
||
-------------------------------------------------------------------------------- | ||
- Output of command from line 2 in [tests/with-disabled.run]: | ||
- [value disabled --with-disabled] | ||
-------------------------------------------------------------------------------- | ||
|
||
(no output to stderr) |
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,13 @@ | ||
-------------------------------------------------------------------------------- | ||
- Output of command from line 1 in [tests/with-disabled.run]: | ||
- [value disabled] | ||
-------------------------------------------------------------------------------- | ||
|
||
(no output to stdout) | ||
|
||
-------------------------------------------------------------------------------- | ||
- Output of command from line 2 in [tests/with-disabled.run]: | ||
- [value disabled --with-disabled] | ||
-------------------------------------------------------------------------------- | ||
|
||
my-value |
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,13 @@ | ||
package value_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/jippi/dottie/pkg/test_helpers" | ||
) | ||
|
||
func TestPrintCommand(t *testing.T) { | ||
t.Parallel() | ||
|
||
test_helpers.RunFileBasedCommandTests(t, test_helpers.ReadOnly, "value") | ||
} |