Don't use echo -n since it's nonportable to OSX (#170)

This commit is contained in:
Connor Prussin 2021-03-20 15:17:28 -07:00
parent c913cca696
commit 52f19fbabb
No known key found for this signature in database
GPG Key ID: C72452E036D53A6A
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ runScript script = EffectClass.liftEffect $ ChildProcess.stdout <$>
-- | Say 'hello world!' in chunks when run
sayHello :: HTTPure.Request -> HTTPure.ResponseM
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
main :: HTTPure.ServerM

View File

@ -48,7 +48,7 @@ chunkedSpec = Spec.it "runs the chunked example" do
EffectClass.liftEffect $ close $ pure unit
-- 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
response ?= "hello world!"
response ?= "hello \nworld!\n"
customStackSpec :: TestHelpers.Test
customStackSpec = Spec.it "runs the custom stack example" do