Skip to content

Commit

Permalink
Revert "Remove tests for hooks that change specifications"
Browse files Browse the repository at this point in the history
This reverts commit 6e169b1.
  • Loading branch information
ko1nksm committed Sep 19, 2020
1 parent 7d29da9 commit ecf5003
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions spec/core/dsl_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,16 @@ Describe "core/dsl.sh"
The stdout should eq "before foo after"
End

Describe 'BeforeCall'
It 'failed and evaluation not call'
before() { return 123; }
When call foo
The stdout should not include 'foo'
The status should eq 123
The stderr should be present
End
End

Describe 'AfterCall'
Context 'errexit is on'
Set errexit:on
Expand All @@ -1201,6 +1211,15 @@ Describe "core/dsl.sh"
The status should be failure
End
End

It 'fails cause evaluation to be failure'
after() { return 123; }
When call foo
The status should eq 123
The line 1 of stdout should eq 'before'
The line 2 of stdout should eq 'foo'
The stderr should be present
End
End
End

Expand Down Expand Up @@ -1237,6 +1256,16 @@ Describe "core/dsl.sh"
The stdout should eq "before foo after"
End

Describe 'BeforeRun'
It 'failed and evaluation not run'
before() { return 123; }
When run foo
The stdout should not include 'foo'
The status should eq 123
The stderr should be present
End
End

Describe 'AfterRun'
Context 'errexit is on'
Set errexit:on
Expand All @@ -1261,6 +1290,15 @@ Describe "core/dsl.sh"
The status should be failure
End
End

It 'fails cause evaluation to be failure'
after() { return 123; }
When run foo
The status should eq 123
The line 1 of stdout should eq 'before'
The line 2 of stdout should eq 'foo'
The stderr should be present
End
End
End

Expand Down

0 comments on commit ecf5003

Please sign in to comment.