Skip to content

Commit

Permalink
feat(objectionary#2175): Add one more test
Browse files Browse the repository at this point in the history
volodya-lombrozo committed Jun 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1585899 commit 09cd2d8
Showing 2 changed files with 58 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
xsls:
- /org/eolang/parser/optimize/abstracts-float-up.xsl
- /org/eolang/parser/optimize/remove-levels.xsl
tests:
- /program/errors[count(*)=0]
# 'main' object
- //o[@name='main']
- //o[@name='main']/o[@base='sibling' and @name='@']
- //o[@name='main']/o[not(@base) and @name='arg']
- //o[@name='main']/o[@base='main$sibling' and @name='sibling']
- //o[@name='main']/o[@base='main$sibling' and @name='sibling']/o[@base='arg' and not(@name)]
# 'main$sibling' object
- //o[@name='main$sibling' and count(o)=3]
- //o[@name='main$sibling']/o[not(@base) and @name='arg']
- //o[@name='main$sibling']/o[@base='main$sibling$first' and @name='first']
- //o[@name='main$sibling']/o[@base='main$sibling$first' and @name='first']/o[@base='arg' and not(@name)]
- //o[@name='main$sibling']/o[@base='main$sibling$second' and @name='second']
- //o[@name='main$sibling']/o[@base='main$sibling$second' and @name='second']/o[@base='arg' and not(@name)]
# 'main$sibling$first' object
- //o[@name='main$sibling$first' and count(o)=3]
- //o[@name='main$sibling$first']/o[@base='arg' and not(@name)]
- //o[@name='main$sibling$first']/o[@base='.one' and @name='@']
- //o[@name='main$sibling$first']/o[not(@base) and @name='arg']
# 'main$sibling$second' object
- //o[@name='main$sibling$second' and count(o)=3]
- //o[@name='main$sibling$second']/o[@base='arg' and not(@name)]
- //o[@name='main$sibling$second']/o[@base='.two' and @name='@']
- //o[@name='main$sibling$second']/o[not(@base) and @name='arg']
# Currently the test converts the code from the snippet to:
# ____
# [arg] > main
# sibling > @
# main$sibling > sibling
# arg
#
# [arg] > main$sibling
# main$sibling$first > first
# arg
# main$sibling$second > second
# arg
#
# [arg] > main$sibling$first
# arg.one > @
#
# [] > main$sibling$second
# arg.two > @
# ____
eo: |
[arg] > main
sibling > @
[] > sibling
[] > first
arg.one > @
[] > second
arg.two > @
Original file line number Diff line number Diff line change
@@ -9,16 +9,16 @@ tests:
- //o[@name='main']/o[@base='.eq' and @name='sibling']
- //o[@name='main']/o[@base='.eq' and @name='sibling']/o[@base='main$t2$first' and @name='first' and count(o)=1]
- //o[@name='main']/o[@base='.eq' and @name='sibling']/o[@base='main$t2$second' and @name='second' and count(o)=1]
# 'main$t1$first' object
# 'main$t2$first' object
- //o[@name='main$t2$first' and count(o)=3]
- //o[@name='main$t2$first']/o[@base='arg' and not(@name)]
- //o[@name='main$t2$first']/o[@base='.one' and @name='@']
- //o[@name='main$t2$first']/o[not(@base) and @name='arg']
# 'main$t1$second' object
# 'main$t2$second' object
- //o[@name='main$t2$second' and count(o)=3]
- //o[@name='main$t2$second']/o[@base='arg' and not(@name)]
- //o[@name='main$t2$second']/o[@base='.two' and @name='@']
- //o[@name='main$t2$first']/o[not(@base) and @name='arg']
- //o[@name='main$t2$second']/o[not(@base) and @name='arg']
# Currently the test converts the code from the snippet to:
# ____
# [arg] > main

0 comments on commit 09cd2d8

Please sign in to comment.