Skip to content

Commit cf8c300

Browse files
committed
[test] Add simplest test demonstrating eXist-db problem with Order By implementation - ct:order-alpha-ascending-indexes#0
1 parent 6f263a0 commit cf8c300

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

exist-core/src/test/xquery/xquery3/count.xqm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ function ct:order-descending-index1-after() {
100100
<x index1="{$index1}">{$x}</x>
101101
};
102102

103+
declare
104+
%test:assertEquals(
105+
'<x index1="2" index2="1">b</x>',
106+
'<x index1="1" index2="2">a</x>'
107+
)
108+
function ct:order-alpha-ascending-indexes() {
109+
for $x in ('a', 'b')
110+
count $index1
111+
let $remainder := $index1 mod 2
112+
order by $remainder, $index1
113+
count $index2
114+
return
115+
<x index1="{$index1}" index2="{$index2}">{$x}</x>
116+
};
117+
103118
declare
104119
%test:assertEquals(
105120
'<x index1="1" index2="1">1</x>',

0 commit comments

Comments
 (0)