Skip to content

Commit

Permalink
Adds tests for unfinished pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ignacio committed Mar 1, 2016
1 parent b75d005 commit dcefe71
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions unittest/test.lua
Expand Up @@ -291,6 +291,19 @@ function test_pipeline_invalid_chain()
end


---
-- Calling an unfinished pipeline (a pipeline with no sink) gives an error.
--
function test_call_unfinished_pipeline()
local pipeline = nozzle() .. nozzle() .. nozzle()

assert_error(function() pipeline() end)

local pipeline2 = generic() .. generic() .. generic()

assert_error(function() pipeline2() end)
end

---
-- This test makes sure that two or more filters can be chained together, and that chain can
-- subsequently be chained with more chains, filters or sinks.
Expand Down

0 comments on commit dcefe71

Please sign in to comment.