From 52f19fbabb6c6882533f977b3c2c6a3830b15c05 Mon Sep 17 00:00:00 2001 From: Connor Prussin Date: Sat, 20 Mar 2021 15:17:28 -0700 Subject: [PATCH] Don't use `echo -n` since it's nonportable to OSX (#170) --- docs/Examples/Chunked/Main.purs | 2 +- test/Test/HTTPure/IntegrationSpec.purs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Examples/Chunked/Main.purs b/docs/Examples/Chunked/Main.purs index a8a582f..5b64dbd 100644 --- a/docs/Examples/Chunked/Main.purs +++ b/docs/Examples/Chunked/Main.purs @@ -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 diff --git a/test/Test/HTTPure/IntegrationSpec.purs b/test/Test/HTTPure/IntegrationSpec.purs index 7fa2563..7debe6a 100644 --- a/test/Test/HTTPure/IntegrationSpec.purs +++ b/test/Test/HTTPure/IntegrationSpec.purs @@ -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