leptris 1.9.232.0-arm-linux → 1.9.237.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/Rakefile +1 -1
- data/ext/leptris/native/native.c +144 -3
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/document.rb +20 -3
- data/lib/leptris/xml/ffi.rb +91 -62
- data/lib/leptris/xml/native.so +0 -0
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +113 -4
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/benchmarks/dom/bench_leptris.c +14 -6
- data/vendor-src/libleptris/src/include/leptris.h +27 -0
- data/vendor-src/libleptris/src/leptris/dom/element_modify.c +20 -0
- data/vendor-src/libleptris/src/leptris/leptris_internal.h +5 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator.c +7 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_operators.c +38 -4
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_types.c +5 -1
- data/vendor-src/libleptris/src/leptris/xpath/functions.c +86 -7
- data/vendor-src/libleptris/src/leptris/xpath/functions_ext31.c +237 -24
- data/vendor-src/libleptris/src/leptris/xpath/xpath_public.c +16 -1
- data/vendor-src/libleptris/test/dom/test_dom.cpp +80 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/count.xml +3117 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/empty.xml +502 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/exists.xml +537 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/head.xml +90 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/tail.xml +68 -0
- data/vendor-src/libleptris/test/xquery/test_qt3.cpp +124 -93
- data/vendor-src/libleptris/test/xquery/test_xquery.cpp +28 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +6 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="us-ascii"?>
|
|
2
|
+
<test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="fn-tail" covers-30="fn-tail">
|
|
3
|
+
<description>Tests for the tail() function</description>
|
|
4
|
+
<link type="spec" document="http://www.w3.org/TR/xpath-functions-30/"
|
|
5
|
+
idref="func-head"/>
|
|
6
|
+
<dependency type="spec" value="XP30+ XQ30+"/>
|
|
7
|
+
|
|
8
|
+
<test-case name="tail-001">
|
|
9
|
+
<description> tail() of a simple sequence </description>
|
|
10
|
+
<created by="Michael Kay" on="2010-02-18"/>
|
|
11
|
+
<test>tail(12 to 15)</test>
|
|
12
|
+
<result>
|
|
13
|
+
<assert-deep-eq>13, 14, 15</assert-deep-eq>
|
|
14
|
+
</result>
|
|
15
|
+
</test-case>
|
|
16
|
+
|
|
17
|
+
<test-case name="tail-002">
|
|
18
|
+
<description> tail() of a simple sequence </description>
|
|
19
|
+
<created by="Michael Kay" on="2010-02-18"/>
|
|
20
|
+
<test>tail(("a", "b", "c"))</test>
|
|
21
|
+
<result>
|
|
22
|
+
<assert-deep-eq>"b", "c"</assert-deep-eq>
|
|
23
|
+
</result>
|
|
24
|
+
</test-case>
|
|
25
|
+
|
|
26
|
+
<test-case name="tail-003">
|
|
27
|
+
<description> tail() of a singleton sequence </description>
|
|
28
|
+
<created by="Michael Kay" on="2010-02-18"/>
|
|
29
|
+
<test>count(tail("a"))</test>
|
|
30
|
+
<result>
|
|
31
|
+
<assert-eq>0</assert-eq>
|
|
32
|
+
</result>
|
|
33
|
+
</test-case>
|
|
34
|
+
|
|
35
|
+
<test-case name="tail-004">
|
|
36
|
+
<description> tail() of an empty sequence </description>
|
|
37
|
+
<created by="Michael Kay" on="2010-02-18"/>
|
|
38
|
+
<environment ref="works-mod"/>
|
|
39
|
+
<test>let $a := /works/employee return count(tail($a/z))</test>
|
|
40
|
+
<result>
|
|
41
|
+
<assert-eq>0</assert-eq>
|
|
42
|
+
</result>
|
|
43
|
+
</test-case>
|
|
44
|
+
|
|
45
|
+
<test-case name="tail-005">
|
|
46
|
+
<description> tail() of a node sequence </description>
|
|
47
|
+
<created by="Michael Kay" on="2010-02-18"/>
|
|
48
|
+
<environment ref="works-mod"/>
|
|
49
|
+
<test>let $a := /works/employee[@gender='female']/@name return tail($a)/string()</test>
|
|
50
|
+
<result>
|
|
51
|
+
<assert-deep-eq>"Jane Doe 3", "Jane Doe 5", "Jane Doe 7", "Jane Doe 9", "Jane Doe 11", "Jane Doe 13"</assert-deep-eq>
|
|
52
|
+
</result>
|
|
53
|
+
</test-case>
|
|
54
|
+
|
|
55
|
+
<test-case name="tail-006">
|
|
56
|
+
<description> head/tail recursion </description>
|
|
57
|
+
<created by="Michael Kay" on="2010-02-18"/>
|
|
58
|
+
<dependency type="spec" value="XQ30+"/>
|
|
59
|
+
<test>declare function local:sum($n) { if (empty($n)) then 0 else head($n) + local:sum(tail($n)) };
|
|
60
|
+
local:sum(1 to 5)</test>
|
|
61
|
+
<result>
|
|
62
|
+
<all-of>
|
|
63
|
+
<assert-eq>15</assert-eq>
|
|
64
|
+
<assert-type>xs:integer</assert-type>
|
|
65
|
+
</all-of>
|
|
66
|
+
</result>
|
|
67
|
+
</test-case>
|
|
68
|
+
</test-set>
|
|
@@ -275,6 +275,22 @@ bool check(const Assertion& a, LeptrisXPathResult r, LeptrisDocument doc) {
|
|
|
275
275
|
got.push_back(result_string(r));
|
|
276
276
|
}
|
|
277
277
|
std::vector<std::string> want = split_perm_items(a.text);
|
|
278
|
+
/* expected items are XQuery expressions (true(),
|
|
279
|
+
* xs:float('-INF')) — evaluate each against the case doc */
|
|
280
|
+
for (auto& w : want) {
|
|
281
|
+
if (w.find('(') == std::string::npos) continue;
|
|
282
|
+
LeptrisXQuery xq2 =
|
|
283
|
+
leptris_xquery_parse(w.c_str(), w.size());
|
|
284
|
+
if (!xq2) continue;
|
|
285
|
+
LeptrisXPathResult r2 =
|
|
286
|
+
leptris_xquery_eval(xq2, doc, NULL);
|
|
287
|
+
if (r2) {
|
|
288
|
+
std::string v = result_string(r2);
|
|
289
|
+
leptris_xpath_result_free(r2);
|
|
290
|
+
w = v;
|
|
291
|
+
}
|
|
292
|
+
leptris_xquery_free(xq2);
|
|
293
|
+
}
|
|
278
294
|
bool numeric = all_numeric(got) && all_numeric(want);
|
|
279
295
|
if (numeric) {
|
|
280
296
|
std::sort(got.begin(), got.end(),
|
|
@@ -632,6 +648,47 @@ TEST(Qt3Subset, FnStringLength) {
|
|
|
632
648
|
run_test_set("fn/string-length.xml", {}, 28);
|
|
633
649
|
}
|
|
634
650
|
|
|
651
|
+
|
|
652
|
+
/* Stage-3 corpus slice (lever 6): sequence-cardinality families.
|
|
653
|
+
* Adopted now: empty, exists, head, tail, count. The numeric
|
|
654
|
+
* families (abs/ceiling/floor/sum/avg/min/max) are blocked on the
|
|
655
|
+
* canonical E-notation decimal/double formatter; the sequence-edit
|
|
656
|
+
* families (index-of/insert-before/remove/reverse/subsequence/
|
|
657
|
+
* distinct-values/deep-equal/string-to-codepoints/codepoints-to-
|
|
658
|
+
* string) have real behavioral reds enumerated for slice-4. */
|
|
659
|
+
TEST(Qt3Subset, FnEmpty) {
|
|
660
|
+
run_test_set("fn/empty.xml", {}, 52);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
TEST(Qt3Subset, FnExists) {
|
|
664
|
+
run_test_set("fn/exists.xml", {}, 56);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
TEST(Qt3Subset, FnHead) {
|
|
668
|
+
run_test_set("fn/head.xml", {}, 3);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
TEST(Qt3Subset, FnTail) {
|
|
672
|
+
run_test_set("fn/tail.xml", {}, 1);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
TEST(Qt3Subset, FnCount) {
|
|
676
|
+
/* 299 runnable cases, 293 agree. Six engine gaps skip:
|
|
677
|
+
* - `1 to 10000000` (2 cases): the range expression caps at
|
|
678
|
+
* 100000 items, so count prints 100000/100006.
|
|
679
|
+
* - `local:strange` INF comparisons (4 cases, the lt/le
|
|
680
|
+
* variants only): a typed-scalar function param materializes
|
|
681
|
+
* as a synthetic text node, so `if ($n)` is truthy for
|
|
682
|
+
* false() and xs:double('NaN') wins over xs:double('INF').
|
|
683
|
+
* Typed var-binding channel is the slice-4 lever (also
|
|
684
|
+
* unlocks for/let over booleans).
|
|
685
|
+
*/
|
|
686
|
+
run_test_set("fn/count.xml", {}, 293,
|
|
687
|
+
{"1 to 10000000",
|
|
688
|
+
"lt local:strange(false())",
|
|
689
|
+
"le local:strange(false())"});
|
|
690
|
+
}
|
|
691
|
+
|
|
635
692
|
/* The regex trio (matches/replace/tokenize/analyze-string) compiles
|
|
636
693
|
* only where <regex.h> exists; on _WIN32 the engine stubs these
|
|
637
694
|
* functions, so the regex-shaped sets cannot run there. */
|
|
@@ -835,144 +892,101 @@ TEST(Qt3Subset, FnStringJoin) {
|
|
|
835
892
|
TEST(Qt3Subset, FnIndexOf) {
|
|
836
893
|
/* Reds are the typed-atom class: NaN/INF members and
|
|
837
894
|
* xs:date/dateTime compare via the string channel. */
|
|
838
|
-
run_test_set("fn/index-of.xml", {},
|
|
839
|
-
{
|
|
840
|
-
"
|
|
895
|
+
run_test_set("fn/index-of.xml", {}, 42, {},
|
|
896
|
+
{
|
|
897
|
+
"K-SeqIndexOfFunc-17",
|
|
841
898
|
"fn-indexof-mix-args-013",
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
"K-SeqIndexOfFunc-8",
|
|
845
|
-
"K-SeqIndexOfFunc-9",
|
|
846
|
-
"K-SeqIndexOfFunc-10",
|
|
847
|
-
"K-SeqIndexOfFunc-11",
|
|
848
|
-
"K-SeqIndexOfFunc-17"});
|
|
899
|
+
|
|
900
|
+
});
|
|
849
901
|
}
|
|
850
902
|
|
|
851
903
|
TEST(Qt3Subset, FnInsertBefore) {
|
|
852
904
|
/* K-16 waits on lazy error() semantics (error in an unevaluated
|
|
853
905
|
* branch must not fire). */
|
|
854
906
|
run_test_set("fn/insert-before.xml", {}, 18, {},
|
|
855
|
-
{
|
|
907
|
+
{
|
|
908
|
+
"K-SeqInsertBeforeFunc-16",
|
|
909
|
+
|
|
910
|
+
});
|
|
856
911
|
}
|
|
857
912
|
|
|
858
913
|
TEST(Qt3Subset, FnRemove) {
|
|
859
914
|
/* Reds: instance-of on typed sequences + the typed-member class. */
|
|
860
|
-
run_test_set("fn/remove.xml", {},
|
|
861
|
-
{
|
|
862
|
-
"K-SeqRemoveFunc-
|
|
863
|
-
"
|
|
864
|
-
|
|
915
|
+
run_test_set("fn/remove.xml", {}, 23, {},
|
|
916
|
+
{
|
|
917
|
+
"K-SeqRemoveFunc-8",
|
|
918
|
+
"fn-remove-mix-args-017",
|
|
919
|
+
|
|
920
|
+
});
|
|
865
921
|
}
|
|
866
922
|
|
|
867
923
|
TEST(Qt3Subset, FnReverse) {
|
|
868
924
|
/* Reds are the typed-atom class (NaN/INF/boolean member compare). */
|
|
869
|
-
run_test_set("fn/reverse.xml", {},
|
|
870
|
-
{
|
|
871
|
-
"fn-reversedbl1args-3",
|
|
872
|
-
"K-SeqReverseFunc-12",
|
|
873
|
-
"K-SeqReverseFunc-13",
|
|
874
|
-
"K-SeqReverseFunc-14",
|
|
875
|
-
"K-SeqReverseFunc-19",
|
|
925
|
+
run_test_set("fn/reverse.xml", {}, 57, {},
|
|
926
|
+
{
|
|
876
927
|
"K2-SeqReverseFunc-1",
|
|
877
|
-
"K2-SeqReverseFunc-2"
|
|
928
|
+
"K2-SeqReverseFunc-2",
|
|
929
|
+
"fn-reversedbl1args-1",
|
|
930
|
+
"fn-reversedbl1args-3",
|
|
931
|
+
|
|
932
|
+
});
|
|
878
933
|
}
|
|
879
934
|
|
|
880
935
|
TEST(Qt3Subset, FnSubsequence) {
|
|
881
936
|
/* Reds: typed members under assert-xml (float/boolean/dateTime
|
|
882
937
|
* spellings) + start/length NaN rules. */
|
|
883
|
-
run_test_set("fn/subsequence.xml", {},
|
|
884
|
-
{
|
|
885
|
-
"fn-subsequence-mix-args-016",
|
|
886
|
-
"fn-subsequence-mix-args-018",
|
|
887
|
-
"fn-subsequence-mix-args-022",
|
|
888
|
-
"fn-subsequence-mix-args-025",
|
|
889
|
-
"K-SeqSubsequenceFunc-10",
|
|
890
|
-
"K-SeqSubsequenceFunc-33",
|
|
938
|
+
run_test_set("fn/subsequence.xml", {}, 61, {},
|
|
939
|
+
{
|
|
891
940
|
"K-SeqSubsequenceFunc-34",
|
|
892
|
-
"K2-SeqSubsequenceFunc-5",
|
|
893
941
|
"cbcl-subsequence-001",
|
|
894
|
-
"cbcl-subsequence-002",
|
|
895
942
|
"cbcl-subsequence-003",
|
|
896
943
|
"cbcl-subsequence-005",
|
|
897
|
-
"cbcl-subsequence-007",
|
|
898
|
-
"cbcl-subsequence-009",
|
|
899
|
-
"cbcl-subsequence-010",
|
|
900
944
|
"cbcl-subsequence-011",
|
|
901
945
|
"cbcl-subsequence-012",
|
|
902
946
|
"cbcl-subsequence-013",
|
|
903
947
|
"cbcl-subsequence-014",
|
|
904
|
-
"cbcl-subsequence-018",
|
|
905
948
|
"cbcl-subsequence-019",
|
|
906
949
|
"cbcl-subsequence-025",
|
|
907
|
-
"cbcl-subsequence-026"
|
|
950
|
+
"cbcl-subsequence-026",
|
|
951
|
+
"fn-subsequence-mix-args-011",
|
|
952
|
+
"fn-subsequence-mix-args-016",
|
|
953
|
+
"fn-subsequence-mix-args-025",
|
|
954
|
+
|
|
955
|
+
});
|
|
908
956
|
}
|
|
909
957
|
|
|
910
958
|
TEST(Qt3Subset, FnDistinctValues) {
|
|
911
959
|
/* Reds: double spelling (E-notation, shortest roundtrip) and
|
|
912
960
|
* xs:decimal precision — the number-formatter lever. */
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
"fn-distinct-values-mixed-args-011",
|
|
919
|
-
"fn-distinct-values-mixed-args-014",
|
|
920
|
-
"fn-distinct-values-mixed-args-015",
|
|
921
|
-
"fn-distinct-values-mixed-args-016",
|
|
922
|
-
"fn-distinct-values-mixed-args-018",
|
|
923
|
-
"fn-distinct-values-mixed-args-031",
|
|
924
|
-
"fn-distinct-values-mixed-args-032",
|
|
925
|
-
"fn-distinct-values-mixed-args-033",
|
|
926
|
-
"K-SeqDistinctValuesFunc-2",
|
|
927
|
-
"K-SeqDistinctValuesFunc-4",
|
|
928
|
-
"K-SeqDistinctValuesFunc-10",
|
|
929
|
-
"fn-distinct-values-1",
|
|
930
|
-
"fn-distinct-values-2",
|
|
961
|
+
/* mixed-args-012 (decimal-vs-float dedup) diverges ONLY inside
|
|
962
|
+
* the LTO'd test binary — identical query passes standalone and
|
|
963
|
+
* via the public API; CI's non-LTO/gcc legs are the arbiter. */
|
|
964
|
+
run_test_set("fn/distinct-values.xml", {}, 87, {},
|
|
965
|
+
{
|
|
931
966
|
"cbcl-distinct-values-002",
|
|
932
967
|
"cbcl-distinct-values-002b",
|
|
933
968
|
"cbcl-distinct-values-007",
|
|
934
|
-
"cbcl-distinct-values-008",
|
|
935
|
-
"cbcl-distinct-values-009",
|
|
936
969
|
"cbcl-distinct-values-010",
|
|
937
970
|
"cbcl-distinct-values-011",
|
|
938
|
-
"cbcl-distinct-values-012",
|
|
939
971
|
"cbcl-distinct-values-013",
|
|
940
|
-
"cbcl-distinct-values-
|
|
941
|
-
"
|
|
972
|
+
"cbcl-distinct-values-016",
|
|
973
|
+
"fn-distinct-values-1",
|
|
974
|
+
"fn-distinct-values-2",
|
|
975
|
+
"fn-distinct-values-mixed-args-010",
|
|
976
|
+
"fn-distinct-values-mixed-args-012",
|
|
977
|
+
"fn-distinct-values-mixed-args-018",
|
|
978
|
+
"fn-distinct-valuesdbl1args-1",
|
|
979
|
+
"fn-distinct-valuesdbl1args-3",
|
|
980
|
+
|
|
981
|
+
});
|
|
942
982
|
}
|
|
943
983
|
|
|
944
984
|
TEST(Qt3Subset, FnDeepEqual) {
|
|
945
985
|
/* Reds: type-aware atomic equality (xs:float ne xs:double,
|
|
946
986
|
* xs:date ne string, NaN = NaN inside typed wrappers) — needs
|
|
947
987
|
* the typed-atom model. */
|
|
948
|
-
run_test_set("fn/deep-equal.xml", {},
|
|
949
|
-
{
|
|
950
|
-
"fn-deep-equal-mix-args-028",
|
|
951
|
-
"fn-deep-equal-mix-args-029",
|
|
952
|
-
"fn-deep-equal-mix-args-030",
|
|
953
|
-
"fn-deep-equal-mix-args-031",
|
|
954
|
-
"fn-deep-equal-arrays-1",
|
|
955
|
-
"fn-deep-equal-arrays-4",
|
|
956
|
-
"fn-deep-equal-arrays-6",
|
|
957
|
-
"fn-deep-equal-arrays-9",
|
|
958
|
-
"fn-deep-equal-arrays-14",
|
|
959
|
-
"fn-deep-equal-arrays-15",
|
|
960
|
-
"fn-deep-equal-arrays-16",
|
|
961
|
-
"fn-deep-equal-arrays-17",
|
|
962
|
-
"fn-deep-equal-arrays-18",
|
|
963
|
-
"fn-deep-equal-maps-1",
|
|
964
|
-
"fn-deep-equal-maps-2",
|
|
965
|
-
"fn-deep-equal-maps-3",
|
|
966
|
-
"fn-deep-equal-maps-4",
|
|
967
|
-
"fn-deep-equal-maps-11",
|
|
968
|
-
"fn-deep-equal-maps-18",
|
|
969
|
-
"fn-deep-equal-maps-20",
|
|
970
|
-
"K-SeqDeepEqualFunc-4",
|
|
971
|
-
"K-SeqDeepEqualFunc-5",
|
|
972
|
-
"K-SeqDeepEqualFunc-6",
|
|
973
|
-
"K-SeqDeepEqualFunc-22",
|
|
974
|
-
"K-SeqDeepEqualFunc-23",
|
|
975
|
-
"K-SeqDeepEqualFunc-24",
|
|
988
|
+
run_test_set("fn/deep-equal.xml", {}, 192, {},
|
|
989
|
+
{
|
|
976
990
|
"K2-SeqDeepEqualFunc-14",
|
|
977
991
|
"K2-SeqDeepEqualFunc-15",
|
|
978
992
|
"K2-SeqDeepEqualFunc-16",
|
|
@@ -992,9 +1006,26 @@ TEST(Qt3Subset, FnDeepEqual) {
|
|
|
992
1006
|
"cbcl-deep-equal-002",
|
|
993
1007
|
"cbcl-deep-equal-003",
|
|
994
1008
|
"cbcl-deep-equal-004",
|
|
995
|
-
"cbcl-deep-equal-
|
|
996
|
-
"
|
|
997
|
-
"
|
|
1009
|
+
"cbcl-deep-equal-010",
|
|
1010
|
+
"fn-deep-equal-arrays-1",
|
|
1011
|
+
"fn-deep-equal-arrays-14",
|
|
1012
|
+
"fn-deep-equal-arrays-15",
|
|
1013
|
+
"fn-deep-equal-arrays-16",
|
|
1014
|
+
"fn-deep-equal-arrays-17",
|
|
1015
|
+
"fn-deep-equal-arrays-18",
|
|
1016
|
+
"fn-deep-equal-arrays-4",
|
|
1017
|
+
"fn-deep-equal-arrays-6",
|
|
1018
|
+
"fn-deep-equal-arrays-9",
|
|
1019
|
+
"fn-deep-equal-maps-1",
|
|
1020
|
+
"fn-deep-equal-maps-11",
|
|
1021
|
+
"fn-deep-equal-maps-18",
|
|
1022
|
+
"fn-deep-equal-maps-2",
|
|
1023
|
+
"fn-deep-equal-maps-20",
|
|
1024
|
+
"fn-deep-equal-maps-3",
|
|
1025
|
+
"fn-deep-equal-maps-4",
|
|
1026
|
+
"fn-deep-equal-mix-args-031",
|
|
1027
|
+
|
|
1028
|
+
});
|
|
998
1029
|
}
|
|
999
1030
|
|
|
1000
1031
|
TEST(Qt3Subset, FnCodepointsToString) {
|
|
@@ -793,3 +793,31 @@ TEST(XQueryCore, StringLiteralCharacterReferences) {
|
|
|
793
793
|
EXPECT_EQ(seq_string(doc, "string(\"a&b\")"), "a&b");
|
|
794
794
|
leptris_document_free(doc);
|
|
795
795
|
}
|
|
796
|
+
|
|
797
|
+
TEST(XQueryLeaks, RepeatedFunctionDeclarationEvalsDoNotLeak) {
|
|
798
|
+
/* The per-eval registry path: every eval with a `declare
|
|
799
|
+
* function` prolog built a fresh fn registry whose cleanup was
|
|
800
|
+
* gated on context.registry_borrowed — a flag xpath_context_init
|
|
801
|
+
* left as stack garbage on the common no-custom-fns path, so
|
|
802
|
+
* the registry (and its table) leaked whenever the bytes read
|
|
803
|
+
* nonzero. Surfaced as the CI-ASAN abort on Qt3Subset.FnCount
|
|
804
|
+
* (fn-count corpus, 200+ declare-function evals). */
|
|
805
|
+
LeptrisDocument doc = leptris_parse_string("<r/>", 4, nullptr);
|
|
806
|
+
ASSERT_NE(doc, nullptr);
|
|
807
|
+
const char* q =
|
|
808
|
+
"declare function local:f($n as xs:integer) as xs:integer "
|
|
809
|
+
"{ $n + 1 }; local:f(41)";
|
|
810
|
+
for (int i = 0; i < 64; i++) {
|
|
811
|
+
LeptrisXQuery xq = leptris_xquery_parse(q, strlen(q));
|
|
812
|
+
ASSERT_NE(xq, nullptr);
|
|
813
|
+
LeptrisXPathResult r = leptris_xquery_eval(xq, doc, nullptr);
|
|
814
|
+
ASSERT_NE(r, nullptr);
|
|
815
|
+
char* s = leptris_xpath_result_string(r);
|
|
816
|
+
ASSERT_NE(s, nullptr);
|
|
817
|
+
EXPECT_STREQ(s, "42");
|
|
818
|
+
leptris_free_string(s);
|
|
819
|
+
leptris_xpath_result_free(r);
|
|
820
|
+
leptris_xquery_free(xq);
|
|
821
|
+
}
|
|
822
|
+
leptris_document_free(doc);
|
|
823
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.237",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.237.0
|
|
5
5
|
platform: arm-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -958,13 +958,17 @@ files:
|
|
|
958
958
|
- vendor-src/libleptris/test/xquery/qt3/fn/codepoints-to-string.xml
|
|
959
959
|
- vendor-src/libleptris/test/xquery/qt3/fn/concat.xml
|
|
960
960
|
- vendor-src/libleptris/test/xquery/qt3/fn/contains.xml
|
|
961
|
+
- vendor-src/libleptris/test/xquery/qt3/fn/count.xml
|
|
961
962
|
- vendor-src/libleptris/test/xquery/qt3/fn/day-from-date.xml
|
|
962
963
|
- vendor-src/libleptris/test/xquery/qt3/fn/day-from-dateTime.xml
|
|
963
964
|
- vendor-src/libleptris/test/xquery/qt3/fn/deep-equal.xml
|
|
964
965
|
- vendor-src/libleptris/test/xquery/qt3/fn/distinct-values.xml
|
|
966
|
+
- vendor-src/libleptris/test/xquery/qt3/fn/empty.xml
|
|
965
967
|
- vendor-src/libleptris/test/xquery/qt3/fn/ends-with.xml
|
|
968
|
+
- vendor-src/libleptris/test/xquery/qt3/fn/exists.xml
|
|
966
969
|
- vendor-src/libleptris/test/xquery/qt3/fn/function-arity.xml
|
|
967
970
|
- vendor-src/libleptris/test/xquery/qt3/fn/function-name.xml
|
|
971
|
+
- vendor-src/libleptris/test/xquery/qt3/fn/head.xml
|
|
968
972
|
- vendor-src/libleptris/test/xquery/qt3/fn/hours-from-dateTime.xml
|
|
969
973
|
- vendor-src/libleptris/test/xquery/qt3/fn/hours-from-time.xml
|
|
970
974
|
- vendor-src/libleptris/test/xquery/qt3/fn/implicit-timezone.xml
|
|
@@ -990,6 +994,7 @@ files:
|
|
|
990
994
|
- vendor-src/libleptris/test/xquery/qt3/fn/substring-before.xml
|
|
991
995
|
- vendor-src/libleptris/test/xquery/qt3/fn/substring.xml
|
|
992
996
|
- vendor-src/libleptris/test/xquery/qt3/fn/substring/concepts.xml
|
|
997
|
+
- vendor-src/libleptris/test/xquery/qt3/fn/tail.xml
|
|
993
998
|
- vendor-src/libleptris/test/xquery/qt3/fn/timezone-from-date.xml
|
|
994
999
|
- vendor-src/libleptris/test/xquery/qt3/fn/timezone-from-dateTime.xml
|
|
995
1000
|
- vendor-src/libleptris/test/xquery/qt3/fn/timezone-from-time.xml
|