From 4f9ef2a73770465bfe2348795461fc8a90a7b9b0 Mon Sep 17 00:00:00 2001 From: George Dietrich Date: Fri, 22 Sep 2023 10:05:36 -0400 Subject: [PATCH] Make specs compatible with jq 1.7 (#119) --- spec/oq_spec.cr | 5 ++++- spec/processor_spec.cr | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/oq_spec.cr b/spec/oq_spec.cr index 9e4b4a3..28218b0 100644 --- a/spec/oq_spec.cr +++ b/spec/oq_spec.cr @@ -37,7 +37,10 @@ describe OQ do it "should colorize the output with the -C option" do run_binary(input: SIMPLE_JSON_OBJECT, args: ["-c", "-C", "."]) do |output| - output.should eq %(\e[1;39m{\e[0m\e[34;1m"name"\e[0m\e[1;39m:\e[0m\e[0;32m"Jim"\e[0m\e[1;39m\e[1;39m}\e[0m\n) + output.should start_with "\e" + output.should contain %("name") + output.should contain %("Jim") + output.should end_with "\e[0m\n" end end diff --git a/spec/processor_spec.cr b/spec/processor_spec.cr index 0b20706..77b5e6d 100644 --- a/spec/processor_spec.cr +++ b/spec/processor_spec.cr @@ -21,7 +21,7 @@ describe OQ::Processor do end output_io.to_s.should be_empty - error_io.to_s.should eq "parse error: Invalid numeric literal at line 1, column 12\n" + error_io.to_s.should contain "parse error: Invalid numeric literal at line 1, column 12\n" end describe "file input" do