-
-
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.
- Loading branch information
Showing
32 changed files
with
151 additions
and
41 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
---- exec command line 0: [disable KEY_B] | ||
WARNING: The key [KEY_B] is already disabled | ||
---- done command line 0: [disable KEY_B] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [disable KEY_B] | ||
---- done command line 0: [disable KEY_B] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [disable KEY_B] | ||
---- done command line 0: [disable KEY_B] |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
---- exec command line 0: [disable KEY_B] | ||
Key [KEY_B] was successfully disabled | ||
---- done command line 0: [disable KEY_B] |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
---- exec command line 0: [disable NONEXISTING_KEY] | ||
Error: Could not find KEY [NONEXISTING_KEY] | ||
Run 'dottie disable --help' for usage. | ||
---- done command line 0: [disable NONEXISTING_KEY] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [disable NONEXISTING_KEY] | ||
---- done command line 0: [disable NONEXISTING_KEY] |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
---- exec command line 0: [enable KEY_B] | ||
WARNING: The key [KEY_B] is already enabled | ||
---- done command line 0: [enable KEY_B] |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
---- exec command line 0: [enable KEY_B] | ||
Key [KEY_B] was successfully enabled | ||
---- done command line 0: [enable KEY_B] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [enable KEY_B] | ||
---- done command line 0: [enable KEY_B] |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
---- exec command line 0: [enable KEY_B] | ||
Key [KEY_B] was successfully enabled | ||
---- done command line 0: [enable KEY_B] |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
---- exec command line 0: [enable NONEXISTING_KEY] | ||
Error: Could not find KEY [NONEXISTING_KEY] | ||
Run 'dottie enable --help' for usage. | ||
---- done command line 0: [enable NONEXISTING_KEY] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [enable NONEXISTING_KEY] | ||
---- done command line 0: [enable NONEXISTING_KEY] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [print --no-color] | ||
---- done command line 0: [print --no-color] |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
---- exec command line 0: [print --no-color] | ||
|
||
|
||
---- done command line 0: [print --no-color] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [print --pretty --no-color] | ||
---- done command line 0: [print --pretty --no-color] |
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 |
---|---|---|
|
@@ -30,4 +30,3 @@ GROUP_TWO_A="WORLD" | |
|
||
SECRET=KEY | ||
|
||
---- done command line 0: [print --pretty --no-color] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [print --no-color] | ||
---- done command line 0: [print --no-color] |
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 |
---|---|---|
|
@@ -3,4 +3,3 @@ KEY_A="I'm key A" | |
KEY_B="I'm key B" | ||
KEY_C="I'm key C" | ||
|
||
---- done command line 0: [print --no-color] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [print --no-color] | ||
---- done command line 0: [print --no-color] |
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 |
---|---|---|
|
@@ -3,4 +3,3 @@ KEY_A="I'm key A" | |
KEY_B="I'm key B" | ||
KEY_C="I'm key C" | ||
|
||
---- done command line 0: [print --no-color] |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
---- exec command line 0: [print --no-color --group my-first-group] | ||
---- done command line 0: [print --no-color --group my-first-group] |
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
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 set_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/jippi/dottie/pkg/test_helpers" | ||
) | ||
|
||
func TestCommand(t *testing.T) { | ||
t.Parallel() | ||
|
||
test_helpers.RunFileBasedCommandTests(t, 0, "set") | ||
} |
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 @@ | ||
SOME_KEY="SOME_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,9 @@ | ||
SOME_KEY=SOME_VALUE | ||
ANOTHER_KEY=ANOTHER_VALUE --quote-style single | ||
SECOND_KEY="should be before ANOTHER_KEY" --before ANOTHER_KEY | ||
TRUE_SECOND_KEY="HA, I'm after SOME_KEY, so I'm before ANOTHER_KEY now" --after SOME_KEY | ||
SECOND_KEY="damn, I'm the third key now" | ||
SOME_KEY=ANOTHER_VALUE --comment "I'm a comment" --comment "I'm another comment" | ||
A_NUMBER=1 --comment "@dottie/validate number" | ||
NOT_A_NUMBER=abc --comment "@dottie/validate number" | ||
A_NUMBER=2 |
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 @@ | ||
# I'm a comment | ||
# I'm another comment | ||
SOME_KEY="ANOTHER_VALUE" | ||
|
||
TRUE_SECOND_KEY="HA, I'm after SOME_KEY, so I'm before ANOTHER_KEY now" | ||
SECOND_KEY="damn, I'm the third key now" | ||
ANOTHER_KEY='ANOTHER_VALUE' | ||
|
||
# @dottie/validate number | ||
A_NUMBER="2" |
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 @@ | ||
---- exec command line 0: [set SOME_KEY=SOME_VALUE] | ||
---- exec command line 1: [set ANOTHER_KEY=ANOTHER_VALUE --quote-style single] | ||
---- exec command line 2: [set SECOND_KEY=should be before ANOTHER_KEY --before ANOTHER_KEY] | ||
---- exec command line 3: [set TRUE_SECOND_KEY=HA, I'm after SOME_KEY, so I'm before ANOTHER_KEY now --after SOME_KEY] | ||
---- exec command line 4: [set SECOND_KEY=damn, I'm the third key now] | ||
---- exec command line 5: [set SOME_KEY=ANOTHER_VALUE --comment I'm a comment --comment I'm another comment] | ||
---- exec command line 6: [set A_NUMBER=1 --comment @dottie/validate number] | ||
---- exec command line 7: [set NOT_A_NUMBER=abc --comment @dottie/validate number] | ||
NOT_A_NUMBER (-:2) | ||
* (number) The value [abc] is not a valid number. | ||
|
||
Error: validation error | ||
Run 'dottie set --help' for usage. | ||
---- exec command line 8: [set A_NUMBER=2] |
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,25 @@ | ||
---- exec command line 0: [set SOME_KEY=SOME_VALUE] | ||
Key [SOME_KEY] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 1: [set ANOTHER_KEY=ANOTHER_VALUE --quote-style single] | ||
Key [ANOTHER_KEY] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 2: [set SECOND_KEY=should be before ANOTHER_KEY --before ANOTHER_KEY] | ||
Key [SECOND_KEY] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 3: [set TRUE_SECOND_KEY=HA, I'm after SOME_KEY, so I'm before ANOTHER_KEY now --after SOME_KEY] | ||
Key [TRUE_SECOND_KEY] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 4: [set SECOND_KEY=damn, I'm the third key now] | ||
Key [SECOND_KEY] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 5: [set SOME_KEY=ANOTHER_VALUE --comment I'm a comment --comment I'm another comment] | ||
Key [SOME_KEY] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 6: [set A_NUMBER=1 --comment @dottie/validate number] | ||
Key [A_NUMBER] was successfully upserted | ||
File was successfully saved | ||
---- exec command line 7: [set NOT_A_NUMBER=abc --comment @dottie/validate number] | ||
---- exec command line 8: [set A_NUMBER=2] | ||
Key [A_NUMBER] was successfully upserted | ||
File was successfully saved |
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
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