-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kdb: add test for external command specification
- Loading branch information
Showing
2 changed files
with
38 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
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,37 @@ | ||
Mountpoint: user:/tests/cli/external | ||
|
||
< kdb set spec:/sw/elektra/kdb/#0/current/trash "" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash external 1 | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash bin "/path/to/trash.sh" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash command "trash" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash description "Move a file to trash" | ||
< kdb set spec:/sw/elektra/kdb/#0/current/trash/file "" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/file description "The file that should be moved to trash" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/file args/index 0 | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/file args indexed | ||
< kdb set spec:/sw/elektra/kdb/#0/current/trash/force "" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/force description "Delete the file directly" | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/force opt f | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/force opt/long force | ||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/force opt/arg none | ||
|
||
STDERR: .*trash\s+Move a file to trash.* | ||
< kdb --help | ||
|
||
STDERR: .*Usage: kdb trash \[OPTION...\] <file>.*file\s+The file that should be moved to trash.* | ||
< kdb trash --help | ||
|
||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash/file description "The file that will be moved to trash" | ||
|
||
STDERR: .*Usage: kdb trash \[OPTION...\] <file>.*file\s+The file that will be moved to trash.* | ||
< kdb trash --help | ||
|
||
< kdb meta-set spec:/sw/elektra/kdb/#0/current/trash command "delete" | ||
|
||
STDERR: .*delete\s+Move a file to trash.* | ||
< kdb --help | ||
|
||
STDERR: .*Usage: kdb delete \[OPTION...\] <file>.*file\s+The file that will be moved to trash.* | ||
< kdb delete --help | ||
|
||
< kdb rm -rf spec:/sw/elektra/kdb/#0/current/trash |