From 9f32fd6424386336a332b0b50a7fd6ebce95345e Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Thu, 30 Mar 2023 20:35:26 +1300 Subject: Add example tags to example tests --- spec/practical/bf_spec.cr | 2 +- spec/practical/json_spec.cr | 2 +- spec/practical/not_xml_spec.cr | 2 +- spec/practical/words_spec.cr | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'spec') diff --git a/spec/practical/bf_spec.cr b/spec/practical/bf_spec.cr index 1eb1d04..33c2c0b 100644 --- a/spec/practical/bf_spec.cr +++ b/spec/practical/bf_spec.cr @@ -62,7 +62,7 @@ def interpret_bf(ops : Array(BFOp)) : Array(Char) output end -describe "brainfuck parser" do +describe "brainfuck parser", tags: "example" do # From https://esolangs.org/wiki/Brainfuck#Examples hello_world_str = "1 +++++ +++ Set Cell #0 to 8 2 [ diff --git a/spec/practical/json_spec.cr b/spec/practical/json_spec.cr index 79d60dd..e4705e8 100644 --- a/spec/practical/json_spec.cr +++ b/spec/practical/json_spec.cr @@ -25,7 +25,7 @@ def assoc_to_hash(arr : Array({K, V})) : Hash(K, V) forall K, V h end -describe "example: JSON parsing" do +describe "example: JSON parsing", tags: "example" do json_null = Parser.token_sequence("null".chars).map_const(JSONValue.new(nil)) t = Parser.token_sequence("true".chars).map_const(true) diff --git a/spec/practical/not_xml_spec.cr b/spec/practical/not_xml_spec.cr index 4d87481..94ac747 100644 --- a/spec/practical/not_xml_spec.cr +++ b/spec/practical/not_xml_spec.cr @@ -125,7 +125,7 @@ end # Adapted from: https://bodil.lol/parser-combinators/ -describe "markup language similar to XML" do +describe "markup language similar to XML", tags: "example" do expected_value = Element.new( "top", [Attribute.new("label", "Top")], diff --git a/spec/practical/words_spec.cr b/spec/practical/words_spec.cr index 35a4113..4713694 100644 --- a/spec/practical/words_spec.cr +++ b/spec/practical/words_spec.cr @@ -2,7 +2,7 @@ require "../spec_helper" include Parcom -describe "Text surrounded by whitespace" do +describe "Text surrounded by whitespace", tags: "example" do ws_char = Parser(Char, Char).satisfy(&.whitespace?) normal_char = Parser(Char, Char).satisfy { |c| !c.whitespace? } -- cgit v1.2.1