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
125f8d43
Commit
125f8d43
authored
Jan 14, 2015
by
Jorge Bucaran
Committed by
Bruno Pinto
Jan 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subsequent tests should run if one test fails.
parent
5f92c044
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
9 deletions
+15
-9
oh-my-fish.fish
oh-my-fish.fish
+1
-0
plugins/fish-spec/expect.fish
plugins/fish-spec/expect.fish
+6
-0
plugins/fish-spec/spec.eval.fish
plugins/fish-spec/spec.eval.fish
+3
-1
plugins/fish-spec/spec.run.fish
plugins/fish-spec/spec.run.fish
+4
-7
spec/oh-my-fish.spec.fish
spec/oh-my-fish.spec.fish
+1
-1
No files found.
oh-my-fish.fish
View file @
125f8d43
...
...
@@ -15,6 +15,7 @@ if not contains $fish_path/functions/ $fish_function_path
set fish_function_path $fish_path/functions/ $fish_function_path
end
# Add imported plugins, completions and themes. Customize imported
# commands via the $fish_path/custom directory, for example create
# a directory under $fish_path/custom/themes with the same name as
...
...
plugins/fish-spec/expect.fish
View file @
125f8d43
...
...
@@ -21,6 +21,12 @@
# spec.run
#/
function expect
# Abort if last call to `expect` finished with $status 1. This allows to
# stop individual tests from running if at least one expect call fails.
if [ $status -eq 1 ]
return 1
end
set -l expected $argv[1..-3]
set -l condition $argv[-2]
set -l actual $argv[-1]
...
...
plugins/fish-spec/spec.eval.fish
View file @
125f8d43
...
...
@@ -81,6 +81,7 @@ function spec.eval -d "Eval a function by name and echo its description field."
end
end
set -l result 0
for test in $tests
if [ -z "$silent" ]
set -l info (spec.get.info $tests)
...
...
@@ -91,6 +92,7 @@ function spec.eval -d "Eval a function by name and echo its description field."
spec.log --message $default_color "$info"
end
eval $test
or
return
1
or
set result
1
end
return $result
end
plugins/fish-spec/spec.run.fish
View file @
125f8d43
...
...
@@ -47,17 +47,14 @@ function spec.run
spec.eval before_all $output
for test in (spec.functions "it_")
spec.eval before_each $output
# Stop test execution if an expectation fails.
# Flunk test if any single test fails, but do not stop the suite.
if not spec.eval $test --unit --depth 1 $output
set result 1
# Flunk
set result 1
end
# Make sure to run after_each
if
test fails.
# Make sure to run after_each
even if a
test fails.
spec.eval after_each $output
if [ $result -eq 1 ]
# We can safely exit the loop if test fails.
break
end
end
spec.eval after_all $output
...
...
spec/oh-my-fish.spec.fish
View file @
125f8d43
...
...
@@ -57,7 +57,7 @@ function describe_oh_my_fish -d "Oh-My-Fish test spec..."
set -g fish_plugins bak z
load_oh_my_fish
expect $fish_function_path --to-contain $fish_path/plugins/bak
and
expect $fish_function_path --to-contain $fish_path/plugins/z
expect $fish_function_path --to-contain $fish_path/plugins/z
end
function it_loads_the_selected_theme \
...
...
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