Don't use echo -n
since it's nonportable to OSX (#170)
This commit is contained in:
parent
c913cca696
commit
52f19fbabb
@ -17,7 +17,7 @@ runScript script = EffectClass.liftEffect $ ChildProcess.stdout <$>
|
|||||||
-- | Say 'hello world!' in chunks when run
|
-- | Say 'hello world!' in chunks when run
|
||||||
sayHello :: HTTPure.Request -> HTTPure.ResponseM
|
sayHello :: HTTPure.Request -> HTTPure.ResponseM
|
||||||
sayHello =
|
sayHello =
|
||||||
const $ runScript "echo -n 'hello '; sleep 1; echo -n 'world!'" >>= HTTPure.ok
|
const $ runScript "echo 'hello '; sleep 1; echo 'world!'" >>= HTTPure.ok
|
||||||
|
|
||||||
-- | Boot up the server
|
-- | Boot up the server
|
||||||
main :: HTTPure.ServerM
|
main :: HTTPure.ServerM
|
||||||
|
@ -48,7 +48,7 @@ chunkedSpec = Spec.it "runs the chunked example" do
|
|||||||
EffectClass.liftEffect $ close $ pure unit
|
EffectClass.liftEffect $ close $ pure unit
|
||||||
-- TODO this isn't a great way to validate this, we need a way of inspecting
|
-- TODO this isn't a great way to validate this, we need a way of inspecting
|
||||||
-- each individual chunk instead of just looking at the entire response
|
-- each individual chunk instead of just looking at the entire response
|
||||||
response ?= "hello world!"
|
response ?= "hello \nworld!\n"
|
||||||
|
|
||||||
customStackSpec :: TestHelpers.Test
|
customStackSpec :: TestHelpers.Test
|
||||||
customStackSpec = Spec.it "runs the custom stack example" do
|
customStackSpec = Spec.it "runs the custom stack example" do
|
||||||
|
Loading…
Reference in New Issue
Block a user