Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
b2643e95
Commit
b2643e95
authored
Dec 11, 2020
by
Pablo Santiago Blum de Aguiar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert output content in basic tests
parent
df20117b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
pkg/omf/spec/basic_spec.fish
pkg/omf/spec/basic_spec.fish
+27
-2
No files found.
pkg/omf/spec/basic_spec.fish
View file @
b2643e95
...
@@ -5,18 +5,43 @@ function describe_basic_tests
...
@@ -5,18 +5,43 @@ function describe_basic_tests
function it_has_a_help_command
function it_has_a_help_command
set -l output (omf help)
set -l output (omf help)
echo $output | grep -Eq "cd.+Change to root or package directory"
echo $output | grep -Eq "channel.+Get or change the update channel"
echo $output | grep -Eq "describe.+Show information about a package"
echo $output | grep -Eq "destroy.+Uninstall Oh My Fish"
echo $output | grep -Eq "doctor.+Troubleshoot Oh My Fish"
echo $output | grep -Eq "help.+Shows help about a command"
echo $output | grep -Eq "install.+Install one or more packages"
echo $output | grep -Eq "list.+List installed packages"
echo $output | grep -Eq "new.+Create a new package from a template"
echo $output | grep -Eq "reload.+Reload the current shell"
echo $output | grep -Eq "remove.+Remove a package"
echo $output | grep -Eq "repositories.+Manage package repositories"
echo $output | grep -Eq "search.+Search for a package or theme"
echo $output | grep -Eq "theme.+Install and list themes"
echo $output | grep -Eq "update.+Update Oh My Fish"
echo $output | grep -Eq "version.+Display version and exit"
assert 0 = $status
assert 0 = $status
end
end
function it_has_a_doctor_command
function it_has_a_doctor_command
set -l output (omf doctor)
set -l output (omf doctor)
assert 0 = $status
assert 0 = $status
assert -n (echo $output | grep "Oh My Fish version")
assert -n (echo $output | grep "Checking for a sane environment...")
end
end
function it_install_packages
function it_install
s
_packages
set -l remove_output (omf remove apt 2> /dev/null)
set -l remove_output (omf remove apt 2> /dev/null)
set -l install_output (omf install apt)
set -l install_output (omf install apt)
assert 0 = $status
assert -n (echo $install_output | grep "apt successfully installed.")
end
function it_removes_packages
set -l install_output (omf install apt 2> /dev/null)
set -l remove_output (omf remove apt)
assert 0 = $status
assert 0 = $status
assert -n (echo $remove_output | grep -q "apt successfully removed.")
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment