Skip to content

Commit

Permalink
Combine tests - attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kolen committed Feb 14, 2024
1 parent c12def9 commit a6aed3d
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 96 deletions.
24 changes: 0 additions & 24 deletions test/corpus/attr_quoted_multiline.txt

This file was deleted.

101 changes: 101 additions & 0 deletions test/corpus/attributes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
=================
Simple attributes
=================

img src="1.png"

---

(source_file
(element
name: (tag_name)
attrs: (attrs
(attr
name: (attr_name)
assignment: (attr_assignment)
value: (attr_value)))))

===============
Ruby attributes
===============

span title=generate_title("example title") data = { a: 10, b: [20, 30] }

---

(source_file
(element
(tag_name)
(attrs
(attr (attr_name) (attr_assignment) (attr_value))
(attr (attr_name) (attr_assignment) (attr_value)))))

===========================
Ruby attributes - multiline
===========================

span title=make_title(style: :standard,
prefix: "First page -" \
" my site")

---

(source_file
(element
(tag_name)
(attrs
(attr (attr_name) (attr_assignment) (attr_value)))))

===========================
Ruby attributes - delimited
===========================

span(title = Title::Generator.generate(type: :simple) data-visible = "yes")

---

(source_file
(element
(tag_name)
(attrs
(attr (attr_name) (attr_assignment) (attr_value))
(attr (attr_name) (attr_assignment) (attr_value)))))

=================================================
Ruby attributes - delimited - ends with delimiter
=================================================

span[title=make_title]

---

(source_file
(element
(tag_name)
(attrs
(attr (attr_name) (attr_assignment) (attr_value)))))

==========================
Multiline quoted attribute
==========================

span title="example example
example

example {"example"{1}}
example" lang="en"

---

(source_file
(element
(tag_name)
(attrs
(attr
(attr_name)
(attr_assignment)
(attr_value))
(attr
(attr_name)
(attr_assignment)
(attr_value)))))
14 changes: 0 additions & 14 deletions test/corpus/attributes_ruby.txt

This file was deleted.

14 changes: 0 additions & 14 deletions test/corpus/attributes_ruby_delimited.txt

This file was deleted.

13 changes: 0 additions & 13 deletions test/corpus/attributes_ruby_delimited_end_with_delimiter.txt

This file was deleted.

15 changes: 0 additions & 15 deletions test/corpus/attributes_ruby_multiline.txt

This file was deleted.

16 changes: 0 additions & 16 deletions test/corpus/attributes_simple.txt

This file was deleted.

0 comments on commit a6aed3d

Please sign in to comment.