-
Notifications
You must be signed in to change notification settings - Fork 1k
Return expect to verify neo-cli #3318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
57019c4
Return expect to verify neo-cli
vncoelho d1eb98d
Create test-neo-cli.expect
vncoelho 6e6ff38
Organize
vncoelho c892918
Update test-neo-cli.expect
vncoelho 2d8f882
Update test-neo-cli.expect
vncoelho 4fb55ca
Update main.yml
vncoelho c076c7c
Update main.yml
vncoelho 93f6c03
Merge branch 'master' into verify-neo-cli-with-expect
vncoelho f8be919
Try to improve path and dependencies install
vncoelho 82188cd
Depencies are needed for each task
vncoelho 737336e
Break lines
vncoelho 088eca3
Script path
vncoelho 4222424
Organize script folder
vncoelho 8bca0a9
Merge branch 'master' into verify-neo-cli-with-expect
NGDAdmin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,86 @@ | ||
| #!/usr/bin/expect -f | ||
| # | ||
| # This script uses expect to test neo-cli | ||
| # | ||
| set timeout 10 | ||
|
|
||
|
|
||
| # Start neo-cli | ||
| spawn dotnet out/Neo.CLI/neo-cli.dll | ||
|
|
||
| # Expect the main input prompt | ||
| expect { | ||
| "neo> " { } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| # | ||
| # Test 'create wallet' | ||
| # | ||
| send "create wallet test-wallet1.json\n" | ||
|
|
||
| expect { | ||
| "password:" { send "asd\n" } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| expect { | ||
| "password:" { send "asd\n" } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| expect { | ||
| " Address:" { } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
|
|
||
| # | ||
| # Test 'create wallet' | ||
| # | ||
| send "create wallet test-wallet2.json L2ArHTuiDL4FHu4nfyhamrG8XVYB4QyRbmhj7vD6hFMB5iAMSTf6\n" | ||
|
|
||
| expect { | ||
| "password:" { send "abcd\n" } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| expect { | ||
| "password:" { send "abcd\n" } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| expect { | ||
| "NUj249PQg9EMJfAuxKizdJwMG7GSBzYX2Y" { } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| # | ||
| # Test 'list address' | ||
| # | ||
| send "list address\n" | ||
|
|
||
| expect { | ||
| "neo> " { } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
|
|
||
| # | ||
| # Test 'create address' | ||
| # | ||
| send "create address\n" | ||
|
|
||
| expect { | ||
| "neo> " { } | ||
| "error" { exit 2 } | ||
| timeout { exit 1 } | ||
| } | ||
| exit 0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.