-
Notifications
You must be signed in to change notification settings - Fork 601
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
26 changed files
with
188 additions
and
21 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,7 @@ | ||
source lib.exp0 | ||
|
||
# abort completes with change ids | ||
rechat "snap abort \t\t" "1 *2" | ||
|
||
cancel | ||
brexit |
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,8 @@ | ||
source lib.exp0 | ||
|
||
# ack completes with directories and files | ||
chat "snap ack ./\t\t" "ack.exp" true | ||
chat "" " testdir/" | ||
|
||
cancel | ||
brexit |
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,8 @@ | ||
source lib.exp0 | ||
|
||
# buy completes remote snaps only | ||
chat "snap buy \t\t" "snap buy ??$" | ||
chat "test-\t\t" "test-assumes*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,7 @@ | ||
source lib.exp0 | ||
|
||
# change completes with change ids | ||
rechat "snap change \t\t" "1 *2" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap delete-key \t" "snap delete-key default" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap disable \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,7 @@ | ||
source lib.exp0 | ||
|
||
# download with 3+ chars completes store stuff | ||
chat "snap download test-\t\t" "test-assumes" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap enable \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap export-key \t" "snap export-key default" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap get \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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 @@ | ||
source lib.exp0 | ||
|
||
# info completes directories and snap files, and locally installed snaps | ||
chat "snap inf\t\t\t" "bar.snap*core*testdir/" | ||
|
||
# with 3+ chars, also remote snaps | ||
chat "test-\t\t" "test-assumes" | ||
|
||
cancel | ||
brexit |
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,11 +1,21 @@ | ||
source lib.exp | ||
source lib.exp0 | ||
|
||
# install completes directories and snaps | ||
chat "snap ins\t\t\t" "basic_1.0_all.snap*testdir/" | ||
next | ||
chat "snap ins\t\t\t" "bar.snap*testdir/" | ||
|
||
# install with 3+ chars also completes store stuff | ||
chat "tes\t\t\t" "test-snapd-tools*testdir/" | ||
chat "tes\t\t\t" "test-assumes" true | ||
# TODO: don't list things already installed: | ||
chat "" "test-snapd-tools" true | ||
chat "" "testdir/" | ||
cancel | ||
|
||
# no extra space added after a directory | ||
chat "snap ins\t./tes\t" " ./testdir/$" | ||
cancel | ||
|
||
# extra space added after a file | ||
chat "snap ins\t./bar\t" " ./bar.snap $" | ||
|
||
cancel | ||
brexit |
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,15 @@ | ||
source lib.exp0 | ||
|
||
# create a key doesn't complete | ||
chat "snap create-key \t\t" "snap create-key ??$" | ||
chat "\r" "Passphrase:" | ||
chat "\r" "Confirm passphrase:" | ||
send "\r" | ||
|
||
# this can take a while | ||
set timeout 60 | ||
|
||
next | ||
cancel | ||
brexit | ||
|
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,7 @@ | ||
source lib.exp0 | ||
|
||
# list completes locally installed snaps | ||
chat "snap list \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap refresh \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap remove \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap revert \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap set \t\t" "core*test-snapd-tools" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap sign-build -k\t" "kdefault" | ||
|
||
cancel | ||
brexit |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap sign -k\t" "kdefault" | ||
|
||
cancel | ||
brexit |
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,17 +1,20 @@ | ||
summary: Check different completions | ||
systems: [-ubuntu-core-16-64, -ubuntu-core-16-arm-64, -ubuntu-core-16-arm-32] | ||
|
||
prepare: | | ||
touch basic_1.0_all.snap | ||
mkdir -p testdir | ||
touch testdir/foo.snap | ||
touch bar.snap | ||
snap install core | ||
snap install test-snapd-tools | ||
expect -d -f key.exp0 | ||
restore: | | ||
rm basic_1.0_all.snap | ||
rm testdir/foo.snap bar.snap | ||
rmdir testdir | ||
execute: | | ||
echo "Toplevel completion" | ||
expect -d -f toplevel.exp | ||
echo "Install completion" | ||
expect -d -f install.exp | ||
for i in *.exp; do | ||
echo $i | ||
expect -d -f $i | ||
done |
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,6 @@ | ||
source lib.exp0 | ||
|
||
chat "snap try \t" "testdir/" | ||
|
||
cancel | ||
brexit |
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,7 @@ | ||
source lib.exp0 | ||
|
||
# watch completes with change ids | ||
rechat "snap watch \t\t" "1 *2" | ||
|
||
cancel | ||
brexit |