Merge lp:~zorba-coders/zorba/prune-test-dir into lp:zorba
- prune-test-dir
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Chris Hillery |
Approved revision: | 11452 |
Merged at revision: | 11449 |
Proposed branch: | lp:~zorba-coders/zorba/prune-test-dir |
Merge into: | lp:zorba |
Diff against target: |
5992 lines (+43/-4604) 227 files modified
test/CMakeLists.txt (+0/-24) test/apitest_spec (+0/-47) test/cmp_5thelem_test_results (+0/-40) test/cmp_ctest_logs (+0/-32) test/collect_ctest_log_errors (+0/-104) test/coverity/update.sh (+0/-37) test/ctest_query_emu (+0/-133) test/ctest_time_elapsed (+0/-15) test/ctest_undef_funcs (+0/-15) test/parser/CMakeLists.txt (+0/-39) test/parser/Queries/HigherOrder/fail_hof-910.xq (+0/-10) test/parser/Queries/HigherOrder/hof-001.xq (+0/-10) test/parser/Queries/HigherOrder/hof-002.xq (+0/-14) test/parser/Queries/HigherOrder/hof-003.lib (+0/-10) test/parser/Queries/HigherOrder/hof-003.xq (+0/-8) test/parser/Queries/HigherOrder/hof-004.xq (+0/-7) test/parser/Queries/HigherOrder/hof-007.xq (+0/-9) test/parser/Queries/HigherOrder/hof-008.xq (+0/-7) test/parser/Queries/HigherOrder/hof-009.xq (+0/-9) test/parser/Queries/HigherOrder/hof-016.xq (+0/-11) test/parser/Queries/HigherOrder/hof-017.xq (+0/-11) test/parser/Queries/HigherOrder/hof-018.xq (+0/-15) test/parser/Queries/HigherOrder/hof-019.xq (+0/-15) test/parser/Queries/HigherOrder/hof-020.xq (+0/-10) test/parser/Queries/HigherOrder/hof-021.xq (+0/-10) test/parser/Queries/HigherOrder/hof-022.xq (+0/-11) test/parser/Queries/HigherOrder/hof-023.xq (+0/-8) test/parser/Queries/HigherOrder/hof-024.xq (+0/-8) test/parser/Queries/HigherOrder/hof-025.xq (+0/-8) test/parser/Queries/HigherOrder/hof-026.xq (+0/-9) test/parser/Queries/HigherOrder/hof-027.xq (+0/-8) test/parser/Queries/HigherOrder/hof-028.xq (+0/-10) test/parser/Queries/HigherOrder/hof-029.xq (+0/-10) test/parser/Queries/HigherOrder/hof-030.xq (+0/-12) test/parser/Queries/HigherOrder/hof-031.xq (+0/-10) test/parser/Queries/HigherOrder/hof-032.xq (+0/-7) test/parser/Queries/HigherOrder/hof-033.xq (+0/-7) test/parser/Queries/HigherOrder/hof-034.xq (+0/-7) test/parser/Queries/HigherOrder/hof-035.xq (+0/-7) test/parser/Queries/HigherOrder/hof-036.xq (+0/-7) test/parser/Queries/HigherOrder/hof-037.xq (+0/-14) test/parser/Queries/HigherOrder/hof-038.xq (+0/-15) test/parser/Queries/HigherOrder/hof-039.xq (+0/-19) test/parser/Queries/HigherOrder/hof-040.xq (+0/-11) test/parser/Queries/HigherOrder/hof-041.xq (+0/-10) test/parser/Queries/HigherOrder/hof-042.xq (+0/-14) test/parser/Queries/HigherOrder/hof-043.xq (+0/-15) test/parser/Queries/HigherOrder/hof-044.xq (+0/-15) test/parser/Queries/HigherOrder/hof-045.xq (+0/-12) test/parser/Queries/HigherOrder/hof-046.xq (+0/-17) test/parser/Queries/HigherOrder/hof-047.xq (+0/-20) test/parser/Queries/HigherOrder/hof-902.xq (+0/-10) test/parser/Queries/HigherOrder/hof-903.xq (+0/-10) test/parser/Queries/HigherOrder/hof-904.xq (+0/-10) test/parser/Queries/HigherOrder/hof-905.xq (+0/-10) test/parser/Queries/HigherOrder/hof-906.xq (+0/-10) test/parser/Queries/HigherOrder/hof-907.xq (+0/-10) test/parser/Queries/HigherOrder/hof-908.xq (+0/-10) test/parser/Queries/HigherOrder/hof-909.xq (+0/-10) test/parser/Queries/HigherOrder/hof-911.xq (+0/-7) test/parser/Queries/HigherOrder/hof-912.xq (+0/-11) test/parser/Queries/HigherOrder/hof-913.xq (+0/-11) test/parser/Queries/HigherOrder/hof-914.xq (+0/-11) test/parser/Queries/HigherOrder/hof-915.xq (+0/-8) test/parser/Queries/HigherOrder/hof-916.xq (+0/-8) test/parser/Queries/HigherOrder/hof-917.xq (+0/-8) test/parser/Queries/HigherOrder/hof-918.xq (+0/-12) test/parser/Queries/delete1.xq (+0/-1) test/parser/Queries/delete2.xq (+0/-1) test/parser/Queries/fulltext1.xq (+0/-72) test/parser/Queries/groupby1.xq (+0/-6) test/parser/Queries/index.xq (+0/-43) test/parser/Queries/insert1.xq (+0/-1) test/parser/Queries/insert10.xq (+0/-1) test/parser/Queries/insert2.xq (+0/-1) test/parser/Queries/insert3.xq (+0/-1) test/parser/Queries/insert4.xq (+0/-1) test/parser/Queries/insert5.xq (+0/-1) test/parser/Queries/insert6.xq (+0/-1) test/parser/Queries/insert7.xq (+0/-1) test/parser/Queries/insert8.xq (+0/-1) test/parser/Queries/insert9.xq (+0/-1) test/parser/Queries/rename1.xq (+0/-1) test/parser/Queries/replace1.xq (+0/-1) test/parser/Queries/replace2.xq (+0/-1) test/parser/Queries/scripting1.xq (+0/-24) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-1.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-10.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-11.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-12.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-13.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-14.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-15.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-16.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-17.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-18.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-19.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-2.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-20.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-21.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-22.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-23.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-24.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-25.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-26.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-27.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-28.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-29.xq (+0/-5) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-3.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-30.xq (+0/-8) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-4.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-5.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-6.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-7.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-8.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-9.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-1.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-10.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-11.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-12.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-13.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-14.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-15.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-16.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-17.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-18.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-19.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-2.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-20.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-21.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-22.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-23.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-24.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-25.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-27.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-28.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-29.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-3.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-30.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-31.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-32.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-33.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-34.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-35.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-36.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-37.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-38.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-39.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-4.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-40.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-41.xq (+0/-8) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-42.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-43.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-44.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-45.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-46.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-47.xq (+0/-8) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-48.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-49.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-5.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-50.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-51.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-52.xq (+0/-11) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-53.xq (+0/-10) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-54.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-55.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-56.xq (+0/-8) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-6.xq (+0/-5) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-7.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-8.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-ForExprWithout-9.xq (+0/-8) test/parser/Queries/syntax_errors/fail_K-LetExprWithout-1.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-LetExprWithout-2.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-LetExprWithout-3.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-LetExprWithout-4.xq (+0/-9) test/parser/Queries/syntax_errors/fail_K-WhereExpr-1.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-10.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-WhereExpr-11.xq (+0/-6) test/parser/Queries/syntax_errors/fail_K-WhereExpr-2.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-3.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-4.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-5.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-6.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-7.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K-WhereExpr-8.xq (+0/-5) test/parser/Queries/syntax_errors/fail_K-WhereExpr-9.xq (+0/-7) test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-1.xq (+0/-8) test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-2.xq (+0/-9) test/parser/Queries/syntax_errors/fail_try_catch.xq (+0/-3) test/parser/Queries/transform.xq (+0/-1) test/parser/Queries/try_catch1.xq (+0/-12) test/parser/parsertestdriver.cpp (+0/-324) test/parser/parsertestdriverconfig.h.in (+0/-26) test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh (+1/-1) test/rbkt/Scripts/w3c/import_w3c_testsuite.sh (+1/-1) test/remote/PostProcessTests.xq (+0/-36) test/remote/RunRemoteTest.cmake (+0/-131) test/remote/SvnPackage.cmake (+0/-276) test/test_index.cpp (+0/-311) test/test_plan_serializer.cpp (+0/-125) test/test_store.cpp (+0/-403) test/testsuites/CMakeLists.txt (+0/-27) test/timer.cpp (+0/-126) test/unit/CMakeLists.txt (+1/-0) test/unit/test_filesystempath.cpp (+40/-19) test/zorbatest/acceptance_failure_email_body.txt (+0/-11) test/zorbatest/bl_regression_origin.xqy (+0/-17) test/zorbatest/compile (+0/-28) test/zorbatest/doc/README.txt (+0/-60) test/zorbatest/error_email.txt (+0/-1) test/zorbatest/idx_snapshots (+0/-71) test/zorbatest/integrate (+0/-249) test/zorbatest/load_test_env (+0/-6) test/zorbatest/on_build_failure (+0/-6) test/zorbatest/process_test_results (+0/-1) test/zorbatest/report.xqy (+0/-53) test/zorbatest/report_acceptance_failure (+0/-47) test/zorbatest/run_fixture (+0/-16) test/zorbatest/run_pending_tests (+0/-39) test/zorbatest/run_test (+0/-18) test/zorbatest/setup_framework (+0/-24) test/zorbatest/testing/test_results/acceptance/rbkt/result.txt (+0/-5) test/zorbatest/testing/test_results/acceptance/valgrind/result.txt (+0/-2) test/zorbatest/testing/tests/acceptance/rbkt/run (+0/-57) test/zorbatest/testing/tests/acceptance/valgrind/run (+0/-16) test/zorbatest/testing/tests/acceptance/valgrind/x.xq (+0/-17) test/zorbatest/zorbatest_functions.sh (+0/-36) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/prune-test-dir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Luis Rodriguez Gonzalez | Approve | ||
Chris Hillery | Approve | ||
Review via email: mp+163672@code.launchpad.net |
Commit message
Pruning dead and unused code and scripts from the test directory.
Description of the change
Chris Hillery (ceejatec) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/prune-test-dir into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job prune-test-
The final status was:
No tests were run - build or configure step must have failed.
Not commiting changes.
Error in read script: /home/ceej/
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job prune-test-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve.
Luis Rodriguez Gonzalez (kuraru) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job prune-test-
All tests succeeded!
Preview Diff
1 | === modified file 'test/CMakeLists.txt' |
2 | --- test/CMakeLists.txt 2013-02-07 17:24:36 +0000 |
3 | +++ test/CMakeLists.txt 2013-05-14 10:28:26 +0000 |
4 | @@ -33,7 +33,6 @@ |
5 | ADD_SUBDIRECTORY(extern) |
6 | |
7 | ADD_SUBDIRECTORY(unit) |
8 | -ADD_SUBDIRECTORY(parser) |
9 | ADD_SUBDIRECTORY(update) |
10 | ADD_SUBDIRECTORY(sax2) |
11 | |
12 | @@ -42,32 +41,9 @@ |
13 | INSTALL(DIRECTORY fots_driver |
14 | DESTINATION share/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}) |
15 | |
16 | -SET (TEST_PLAN_SERIALIZER_SRCS |
17 | - test_plan_serializer.cpp |
18 | - timer.cpp) |
19 | - |
20 | # |
21 | # apitest |
22 | # |
23 | ZORBA_GENERATE_EXE("apitest" "apitest.cpp" "" "" "") |
24 | |
25 | -ZORBA_GENERATE_EXE("test_plan_serializer" "${TEST_PLAN_SERIALIZER_SRCS}" "" "" "") |
26 | - |
27 | -ZORBA_GENERATE_EXE("path_test" "path_test.cpp" "" "" "") |
28 | - |
29 | #ZORBA_GENERATE_EXE("ordpath_test" "test_ordpath.cpp" "" "" "") |
30 | - |
31 | -ZORBA_ADD_TEST (test/fspathbranch1 path_test --branch-path /d1/d2/../d3/.) |
32 | -ZORBA_SET_TEST_PROPERTY (test/fspathbranch1 PASS_REGULAR_EXPRESSION /d1) |
33 | - |
34 | -ZORBA_ADD_TEST (test/fspathbranch2 path_test --branch-path /dir) |
35 | -ZORBA_SET_TEST_PROPERTY (test/fspathbranch2 PASS_REGULAR_EXPRESSION /) |
36 | - |
37 | -ZORBA_ADD_TEST (test/fspath1 path_test --path /../d1/./././././././../..) |
38 | -ZORBA_SET_TEST_PROPERTY (test/fspath1 PASS_REGULAR_EXPRESSION /) |
39 | - |
40 | -ZORBA_ADD_TEST (test/fspath2 path_test --path d1/d2/../../../../d3//) |
41 | -ZORBA_SET_TEST_PROPERTY (test/fspath2 PASS_REGULAR_EXPRESSION ../../d3) |
42 | - |
43 | -# External testsuites |
44 | -ADD_SUBDIRECTORY(testsuites) |
45 | |
46 | === removed file 'test/apitest_spec' |
47 | --- test/apitest_spec 2013-02-07 17:24:36 +0000 |
48 | +++ test/apitest_spec 1970-01-01 00:00:00 +0000 |
49 | @@ -1,47 +0,0 @@ |
50 | -#!/bin/bash |
51 | -# Copyright 2006-2009 The FLWOR Foundation. |
52 | -# |
53 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
54 | -# you may not use this file except in compliance with the License. |
55 | -# You may obtain a copy of the License at |
56 | -# |
57 | -# http://www.apache.org/licenses/LICENSE-2.0 |
58 | -# |
59 | -# Unless required by applicable law or agreed to in writing, software |
60 | -# distributed under the License is distributed on an "AS IS" BASIS, |
61 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
62 | -# See the License for the specific language governing permissions and |
63 | -# limitations under the License. |
64 | - |
65 | -# Call with argument -h for information |
66 | - |
67 | -usage () { |
68 | -cat <<EOF |
69 | -Runs a test under apitest. Usage: |
70 | -apitest_spec { --gdb | --valgrind } TEST [ apitest options ] |
71 | -where TEST can be a .spec file or a test name (e.g. zorba/paths/path1) |
72 | -EOF |
73 | -exit 1 |
74 | -} |
75 | - |
76 | -test $# -eq 0 || test "$1" = "-h" || test "$1" = "--help" && usage |
77 | -DIR=$(cd $(dirname $0); pwd) |
78 | -if test "x$1" = "x--valgrind"; then |
79 | - VG="valgrind --num-callers=60"; shift |
80 | -elif test "x$1" = "x--gdb"; then |
81 | - VG="gdb --args"; shift |
82 | -else |
83 | - VG="" |
84 | -fi |
85 | - |
86 | -SPEC=$1; shift |
87 | -test -f $SPEC || SPEC=$DIR/rbkt/Queries/$SPEC.spec |
88 | -test -f "$SPEC" && ARGS=`egrep ^Args: $SPEC | cut -f2- -d: | sed -e 's#$RBKT_SRC_DIR#'"$DIR/rbkt"'#g'` |
89 | - |
90 | -echo |
91 | -test -f "$SPEC" && { echo "Spec file: $SPEC"; cat $SPEC; } |
92 | -echo |
93 | -echo Command: $VG $DIR/zorbatest/build/test/apitest `echo $ARGS` $* `dirname $SPEC`/`basename $SPEC .spec`.xq |
94 | -echo |
95 | -time -p $VG $DIR/zorbatest/build/test/apitest `echo $ARGS` $* `dirname $SPEC`/`basename $SPEC .spec`.xq |
96 | -echo |
97 | |
98 | === removed file 'test/cmp_5thelem_test_results' |
99 | --- test/cmp_5thelem_test_results 2013-02-07 17:24:36 +0000 |
100 | +++ test/cmp_5thelem_test_results 1970-01-01 00:00:00 +0000 |
101 | @@ -1,40 +0,0 @@ |
102 | -#!/bin/bash |
103 | -# Copyright 2006-2008 The FLWOR Foundation. |
104 | -# |
105 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
106 | -# you may not use this file except in compliance with the License. |
107 | -# You may obtain a copy of the License at |
108 | -# |
109 | -# http://www.apache.org/licenses/LICENSE-2.0 |
110 | -# |
111 | -# Unless required by applicable law or agreed to in writing, software |
112 | -# distributed under the License is distributed on an "AS IS" BASIS, |
113 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
114 | -# See the License for the specific language governing permissions and |
115 | -# limitations under the License. |
116 | - |
117 | -if test $# != 2; then |
118 | - echo 'Args: submissionid1 submissionid2' |
119 | - echo 'Identify submissionids from dashboard test result links' |
120 | - exit 1 |
121 | -fi |
122 | - |
123 | -URL='http://dbisdart.inf.ethz.ch/cdash/viewTest.php?onlyfailed&buildid=' |
124 | -SAXON=`dirname $0`/zorbatest/xquery |
125 | -test -f $SAXON || { echo 'xquery script not present'; echo 'run setup_framework in test/zorbatest'; exit 1; } |
126 | - |
127 | -q=`mktemp /tmp/ctr.XXXXXX` |
128 | - |
129 | -cat > $q <<"EOF" |
130 | -declare default element namespace "http://www.w3.org/1999/xhtml"; |
131 | -declare option saxon:output "omit-xml-declaration=yes"; |
132 | -fn:data (//td [not(@class) and parent::tr[@class]]/a/text()) |
133 | -EOF |
134 | - |
135 | -f1=`mktemp /tmp/ctr.XXXXXX` |
136 | -f2=`mktemp /tmp/ctr.XXXXXX` |
137 | - |
138 | -wget "$URL""$1" -O - | sed -e's/\ / /g;s/\&/\&/g;s/XQuery\///g' | tidy --doctype omit -q -asxml 2>/dev/null | $SAXON -s - $q | sort >$f1 |
139 | -wget "$URL""$2" -O - | sed -e's/\ / /g;s/\&/\&/g;s/XQuery\///g' | tidy --doctype omit -q -asxml 2>/dev/null | $SAXON -s - $q | sort | diff -U0 $f1 - | egrep -v '^@' | perl -pe 's#[.]#/#g' |
140 | - |
141 | -rm -f $f1 $q |
142 | |
143 | === removed file 'test/cmp_ctest_logs' |
144 | --- test/cmp_ctest_logs 2013-02-07 17:24:36 +0000 |
145 | +++ test/cmp_ctest_logs 1970-01-01 00:00:00 +0000 |
146 | @@ -1,32 +0,0 @@ |
147 | -#!/bin/sh |
148 | -# Copyright 2006-2008 The FLWOR Foundation. |
149 | -# |
150 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
151 | -# you may not use this file except in compliance with the License. |
152 | -# You may obtain a copy of the License at |
153 | -# |
154 | -# http://www.apache.org/licenses/LICENSE-2.0 |
155 | -# |
156 | -# Unless required by applicable law or agreed to in writing, software |
157 | -# distributed under the License is distributed on an "AS IS" BASIS, |
158 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
159 | -# See the License for the specific language governing permissions and |
160 | -# limitations under the License. |
161 | - |
162 | -if test "$#" != "2"; then |
163 | - echo Args: dir1/LastTestsFailed.log[.gz] dir2/LastTestsFailed.log[.gz] |
164 | - exit 1 |
165 | -fi |
166 | - |
167 | -TMP1=`mktemp /tmp/XXXXXX` |
168 | - |
169 | -mycat() |
170 | -{ |
171 | - if test "`basename $1 .gz`" != "`basename $1`"; then zcat $1; else cat $1; fi |
172 | -} |
173 | - |
174 | -mycat $2 | cut -f2 -d: | sort >$TMP1 |
175 | - |
176 | -mycat $1 | cut -f2 -d: | sort | diff -U0 $TMP1 - | tail -n +3 | egrep -v '^@' |
177 | - |
178 | -rm -f $TMP1 |
179 | |
180 | === removed file 'test/collect_ctest_log_errors' |
181 | --- test/collect_ctest_log_errors 2013-02-07 17:24:36 +0000 |
182 | +++ test/collect_ctest_log_errors 1970-01-01 00:00:00 +0000 |
183 | @@ -1,104 +0,0 @@ |
184 | -#!/usr/bin/perl |
185 | -# Copyright 2006-2008 The FLWOR Foundation. |
186 | -# |
187 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
188 | -# you may not use this file except in compliance with the License. |
189 | -# You may obtain a copy of the License at |
190 | -# |
191 | -# http://www.apache.org/licenses/LICENSE-2.0 |
192 | -# |
193 | -# Unless required by applicable law or agreed to in writing, software |
194 | -# distributed under the License is distributed on an "AS IS" BASIS, |
195 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
196 | -# See the License for the specific language governing permissions and |
197 | -# limitations under the License. |
198 | -use strict; |
199 | -use Getopt::Long; |
200 | -use FindBin; |
201 | -use File::Temp; |
202 | - |
203 | -my ($html, $blame, $parse_err); |
204 | -GetOptions ("html" => \$html, "blame" => \$blame, "parse-err" => \$parse_err); |
205 | - |
206 | -my $test_path = $FindBin::RealBin; |
207 | - |
208 | -my %queries; |
209 | - |
210 | -sub add_assert_fail { |
211 | - my ($q, $file, $fun, $assertion) = @_; |
212 | - $_ = "$file: $fun: $assertion"; |
213 | - if ($html) { |
214 | - s/([&])/$1amp;/g; s/([<])/</g; s/[>]/>/g; |
215 | - } |
216 | - push @{ $queries {$_} }, $q; |
217 | -} |
218 | - |
219 | -sub by_number_desc_then_string { |
220 | - return -(($a <=> $b) || ($a cmp $b)); |
221 | -} |
222 | - |
223 | -sub svn_blame { |
224 | - if (! $blame) { return ""; } |
225 | - |
226 | - my $author; |
227 | - |
228 | - my ($qfh, $qf) = File::Temp::tempfile (); |
229 | - print $qfh ' |
230 | -declare option saxon:output "omit-xml-declaration=yes"; |
231 | -declare variable $line external; |
232 | -//entry [@line-number eq $line]//author/text() |
233 | -'; |
234 | - close ($qfh); |
235 | - |
236 | - if (m#([^:]+):([^:]+):#) { |
237 | - my ($file, $line) = ($1, $2); |
238 | - if (($file eq "?") || ($line eq "?")) { return ""; } |
239 | - $author = `svn blame --xml $file | $test_path/zorbatest/xquery -s - $qf line=$line` |
240 | - } |
241 | - |
242 | - unlink $qf; |
243 | - return "$author: "; |
244 | -} |
245 | - |
246 | -my ($query, $in_valgrind, $vg_err); |
247 | - |
248 | -while (<>) { |
249 | - if (m#^[0-9]+/[0-9]+ Testing: (.*)$#) { |
250 | - $query = $1; |
251 | - $in_valgrind = 0; |
252 | - $vg_err = ""; |
253 | - } elsif (m#^[^:]+: ([^:]+:[0-9]+): (.*): Assertion (.*) failed.$#) { |
254 | - add_assert_fail $query, $1, $2, $3; |
255 | - } elsif (m#XQP0005:.*Assertion (.*) failed in ([^:]+:[0-9]+): (.*)$#) { |
256 | - add_assert_fail $query, $2, $3, $1; |
257 | - } elsif (m#XQP0019: ?Zorba internal error (.*)#) { |
258 | - add_assert_fail $query, "?", "?:?", "XQP0019: exception $1 suppressed"; |
259 | - } elsif (m#^[<] [<]root[>]XPST0003[<]/root>$# && $parse_err) { |
260 | - add_assert_fail $query, "?", "?:?", "parser failure XPST0003"; |
261 | - } elsif (m#^[>] [<]root[>]XPST0003[<]/root>$# && $parse_err) { |
262 | - add_assert_fail $query, "?", "?:?", "parse incorrectly succeeded, should have raised XPST0003"; |
263 | - } elsif (m#running valgrind#) { |
264 | - $in_valgrind = 1; |
265 | - } elsif ($in_valgrind == 1 && m#^==[0-9]+== ([^ ].*)#) { |
266 | - $in_valgrind++; |
267 | - $vg_err = "Valgrind: $1"; |
268 | - } elsif ($in_valgrind == 2 && m#^==[0-9]+== *at 0x[0-9A-Z]+: (.*) [(](.*:[0-9]+)[)]$#) { |
269 | - add_assert_fail ($query, $2, $1, $vg_err); |
270 | - $in_valgrind = 3; |
271 | - } |
272 | -} |
273 | - |
274 | -# change testcase names to include fault count |
275 | -my %queries_new; |
276 | -foreach (keys %queries) { |
277 | - my @qs = @{ $queries {$_} }; |
278 | - $_ = scalar @qs . " queries: " . svn_blame . $_; |
279 | - @{ $queries_new {$_} } = @qs; |
280 | -} |
281 | -%queries = %queries_new; |
282 | - |
283 | -foreach (sort (by_number_desc_then_string keys(%queries))) { |
284 | - my $case = $_; |
285 | - my @qs = @{ $queries {$case} }; |
286 | - print $case . "\n" . join ("\n", @qs) . "\n\n"; |
287 | -} |
288 | |
289 | === removed directory 'test/coverity' |
290 | === removed file 'test/coverity/update.sh' |
291 | --- test/coverity/update.sh 2013-02-07 17:24:36 +0000 |
292 | +++ test/coverity/update.sh 1970-01-01 00:00:00 +0000 |
293 | @@ -1,37 +0,0 @@ |
294 | -#!/bin/bash |
295 | - |
296 | -### |
297 | -# Script for updating project.tgz for Coverity scan |
298 | -### |
299 | - |
300 | - |
301 | -echo "Must have cov-build installed." |
302 | -echo " See: http://scan.coverity.com/self-build/" |
303 | - |
304 | -PATH=$PATH:~/dev/coverity/prevent-linux-2.4.6/bin |
305 | - |
306 | -cov-configure -co /usr/bin/cc |
307 | -#cov-configure -co /usr/bin/g++ |
308 | -cov-configure -co /usr/bin/c++ |
309 | - |
310 | -# cd to build dir |
311 | -pushd . |
312 | -cd ../../build |
313 | - |
314 | -# Optional Run any build steps that you don't want to analyze i.e. ./configure |
315 | -rm -R README emit output |
316 | -make clean |
317 | - |
318 | - |
319 | -cov-build -e emit -o output make -j4 |
320 | - |
321 | -# Create a README file with your name, email, and project's name |
322 | -cat "Cezar Andrei, cezar.andrei@gmail.com, Zorba" > README |
323 | - |
324 | -tar czvf project.tgz README emit output |
325 | - |
326 | -# Upload the project.tgz to your server |
327 | -mv project.tgz ../test/coverity |
328 | - |
329 | -#rm -R README emit output |
330 | -popd |
331 | \ No newline at end of file |
332 | |
333 | === removed file 'test/ctest_query_emu' |
334 | --- test/ctest_query_emu 2013-02-07 17:24:36 +0000 |
335 | +++ test/ctest_query_emu 1970-01-01 00:00:00 +0000 |
336 | @@ -1,133 +0,0 @@ |
337 | -#!/usr/bin/perl |
338 | -# Copyright 2006-2008 The FLWOR Foundation. |
339 | -# |
340 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
341 | -# you may not use this file except in compliance with the License. |
342 | -# You may obtain a copy of the License at |
343 | -# |
344 | -# http://www.apache.org/licenses/LICENSE-2.0 |
345 | -# |
346 | -# Unless required by applicable law or agreed to in writing, software |
347 | -# distributed under the License is distributed on an "AS IS" BASIS, |
348 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
349 | -# See the License for the specific language governing permissions and |
350 | -# limitations under the License. |
351 | - |
352 | -# Call with argument -h for information |
353 | - |
354 | -use strict; |
355 | -use warnings; |
356 | - |
357 | -use File::Find; |
358 | -use File::Path; |
359 | -use Cwd 'abs_path'; |
360 | -use IO::Handle; |
361 | - |
362 | -sub usage { |
363 | - print "Emulates ctest operation for test/rbkt/ tests.\n"; |
364 | - print "Arguments: BUILD_DIR [--suite SUITE_DIR] [-b BUCKET] [-E EXCLUDE_PATTERN] [-R INCLUDE_PATTERN]\n"; |
365 | -} |
366 | - |
367 | -my $rbktdir = `dirname $0`; chomp $rbktdir; $rbktdir = "$rbktdir/rbkt"; |
368 | -my $ext_suite = 0; |
369 | -my $builddir = shift; |
370 | -if (! defined $builddir || ($builddir eq "-h") || ($builddir eq "--help") || ! -e $builddir) |
371 | -{ usage; exit (1); } |
372 | -$builddir = abs_path ($builddir) || die $!; |
373 | -my $bucket = "."; |
374 | -my $exclude; |
375 | -my $include; |
376 | -my $verbose; |
377 | - |
378 | -while (1) { # iterate over args |
379 | - my $arg = shift; |
380 | - if (! defined ($arg)) { last; } |
381 | - if ($arg eq "-b") { $bucket = shift; } |
382 | - elsif ($arg eq "-V") { $verbose = 1; } |
383 | - elsif ($arg eq "-E") { $exclude = shift; } |
384 | - elsif ($arg eq "-R") { $include = shift; } |
385 | - elsif ($arg eq "--suite") { |
386 | - $rbktdir = shift; |
387 | - $ext_suite = 1; |
388 | - } |
389 | - else { die; } |
390 | -} |
391 | - |
392 | --e $rbktdir || die $!; |
393 | -$rbktdir = abs_path ($rbktdir); |
394 | - |
395 | -my $testdriver = "$builddir/test/rbkt/testdriver"; |
396 | --f $testdriver || die $!; |
397 | -my $logfile = "$builddir/Testing/Temporary/LastTest.log"; |
398 | - |
399 | -mkpath "$builddir/Testing/Temporary"; |
400 | -open (LOG, ">$logfile") || die $!; |
401 | -# LOG->autoflush (1); |
402 | - |
403 | -my @failed; |
404 | -my $testcnt = 0; |
405 | - |
406 | -sub finish { |
407 | - close LOG; |
408 | - print "\n\n"; |
409 | - if (@failed > 0) { |
410 | - print ("Failed tests:\n" . join ("\n", @failed) . "\n"); |
411 | - } else { |
412 | - print "All tests passed\n"; |
413 | - } |
414 | - open SUMMARY, ">$builddir/Testing/Temporary/LastTestsFailed.log"; |
415 | - print SUMMARY (join ("\n", @failed) . "\n"); |
416 | - close SUMMARY; |
417 | -} |
418 | - |
419 | -sub ffun { |
420 | - my $fname = $_; |
421 | - if (! ($fname =~ m/[.]xq$/)) { return 1; } |
422 | - ++$testcnt; |
423 | - my $f = $File::Find::name; $f =~ s/[.]xq$//g; $f =~ s@^[.]/@@; |
424 | - if (defined ($exclude) && $f =~ m/$exclude/) { return; } |
425 | - if (defined ($include) && ! ($f =~ m/$include/)) { return; } |
426 | - my $cmd = "$testdriver"; |
427 | - if ($ext_suite) { $cmd = "$cmd --rbkt-src $rbktdir"; } |
428 | - $cmd = "$cmd $f.xq"; |
429 | - print "$testcnt $f... "; |
430 | - print LOG "--- Start test $f\n"; |
431 | - print LOG "Command: $cmd\n"; |
432 | - close LOG; |
433 | - my $rc = system ("$cmd >${logfile}.tmp 2>&1"); |
434 | - open (LOG, ">>$logfile") || die $!; |
435 | - open (QLOG, "<${logfile}.tmp"); |
436 | - while (<QLOG>) { |
437 | - print LOG; |
438 | - if ($verbose) { print; } |
439 | - } |
440 | - close QLOG; |
441 | - unlink "${logfile}.tmp"; |
442 | - |
443 | - if (($rc & 127) == 2) { |
444 | - print "Signal " . ($rc & 127) . "\n"; |
445 | - finish; |
446 | - exit (1); |
447 | - } |
448 | - if ($verbose) { print "Test $f"; } |
449 | - if ($rc != 0) { |
450 | - print "\tFAILED\n"; |
451 | - print LOG "Test failed (code " . ($? >> 8) . ")\n"; |
452 | - push (@failed, "$testcnt:$f"); |
453 | - } else { |
454 | - print "\tPASSED\n"; |
455 | - } |
456 | - print LOG "\n\n--- End test $f\n\n"; |
457 | -} |
458 | - |
459 | -$SIG{'INT'} = 'CLEANUP'; |
460 | -sub CLEANUP { |
461 | - print "Signal 2\n"; |
462 | - print LOG "--- Testing interrupted\n"; |
463 | - finish; |
464 | - exit (1); |
465 | -} |
466 | - |
467 | -chdir ("$rbktdir/Queries") || die $!; |
468 | -finddepth ({ wanted => \&ffun, follow_fast => 1 }, "$bucket/"); |
469 | -finish; |
470 | |
471 | === removed file 'test/ctest_time_elapsed' |
472 | --- test/ctest_time_elapsed 2013-02-07 17:24:36 +0000 |
473 | +++ test/ctest_time_elapsed 1970-01-01 00:00:00 +0000 |
474 | @@ -1,15 +0,0 @@ |
475 | -#!/bin/sh |
476 | -# Copyright 2006-2008 The FLWOR Foundation. |
477 | -# |
478 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
479 | -# you may not use this file except in compliance with the License. |
480 | -# You may obtain a copy of the License at |
481 | -# |
482 | -# http://www.apache.org/licenses/LICENSE-2.0 |
483 | -# |
484 | -# Unless required by applicable law or agreed to in writing, software |
485 | -# distributed under the License is distributed on an "AS IS" BASIS, |
486 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
487 | -# See the License for the specific language governing permissions and |
488 | -# limitations under the License. |
489 | -grep "time elapsed" | perl -ne 'if (m#"(.*)" time elapsed: ([0-9:]+)#) { print "$2 $1\n"}' | sort -n |
490 | |
491 | === removed file 'test/ctest_undef_funcs' |
492 | --- test/ctest_undef_funcs 2013-02-07 17:24:36 +0000 |
493 | +++ test/ctest_undef_funcs 1970-01-01 00:00:00 +0000 |
494 | @@ -1,15 +0,0 @@ |
495 | -#!/bin/sh |
496 | -# Copyright 2006-2008 The FLWOR Foundation. |
497 | -# |
498 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
499 | -# you may not use this file except in compliance with the License. |
500 | -# You may obtain a copy of the License at |
501 | -# |
502 | -# http://www.apache.org/licenses/LICENSE-2.0 |
503 | -# |
504 | -# Unless required by applicable law or agreed to in writing, software |
505 | -# distributed under the License is distributed on an "AS IS" BASIS, |
506 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
507 | -# See the License for the specific language governing permissions and |
508 | -# limitations under the License. |
509 | -perl -ne 'if (m#^Error:.*XPST0017.*context (.* / [0-9]+)$#) { print "$1\n" }' $1 | sort | uniq -c | sort -rn |
510 | |
511 | === removed directory 'test/parser' |
512 | === removed file 'test/parser/CMakeLists.txt' |
513 | --- test/parser/CMakeLists.txt 2013-02-07 17:24:36 +0000 |
514 | +++ test/parser/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
515 | @@ -1,39 +0,0 @@ |
516 | -# Copyright 2006-2008 The FLWOR Foundation. |
517 | -# |
518 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
519 | -# you may not use this file except in compliance with the License. |
520 | -# You may obtain a copy of the License at |
521 | -# |
522 | -# http://www.apache.org/licenses/LICENSE-2.0 |
523 | -# |
524 | -# Unless required by applicable law or agreed to in writing, software |
525 | -# distributed under the License is distributed on an "AS IS" BASIS, |
526 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
527 | -# See the License for the specific language governing permissions and |
528 | -# limitations under the License. |
529 | -# configure and compile the testdriver |
530 | -CONFIGURE_FILE(parsertestdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/parsertestdriverconfig.h) |
531 | -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) |
532 | - |
533 | -#ZORBA_GENERATE_EXE("parsertestdriver" "parsertestdriver.cpp" "" "" "") |
534 | - |
535 | -# collect all queries (suffix .xq) in all subdirectories of the Queries dir |
536 | -#FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ *.xq) |
537 | - |
538 | -#MESSAGE(STATUS "Adding parser tests for CTest") |
539 | - |
540 | -FOREACH(TESTFILE ${TESTFILES}) |
541 | - STRING(LENGTH ${TESTFILE} TESTFILELENGTH) |
542 | - MATH(EXPR TESTLENGTH '${TESTFILELENGTH}-3' ) |
543 | - STRING(SUBSTRING ${TESTFILE} 0 ${TESTLENGTH} TESTNAME) |
544 | - |
545 | - SET (TESTNAME "test/parser/${TESTNAME}") |
546 | - ZORBA_ADD_TEST(${TESTNAME} parsertestdriver ${TESTFILE}) |
547 | - |
548 | - IF (${TESTFILE} MATCHES "fail") |
549 | - ZORBA_SET_TEST_PROPERTY (${TESTNAME} WILL_FAIL TRUE) |
550 | - ELSE (${TESTFILE} MATCHES "fail") |
551 | - ZORBA_SET_TEST_PROPERTY (${TESTNAME} FAIL_REGULAR_EXPRESSION "no parsenode root generated") |
552 | - ENDIF (${TESTFILE} MATCHES "fail") |
553 | - |
554 | -ENDFOREACH(TESTFILE) |
555 | |
556 | === removed directory 'test/parser/Queries' |
557 | === removed directory 'test/parser/Queries/HigherOrder' |
558 | === removed file 'test/parser/Queries/HigherOrder/fail_hof-910.xq' |
559 | --- test/parser/Queries/HigherOrder/fail_hof-910.xq 2013-02-07 17:24:36 +0000 |
560 | +++ test/parser/Queries/HigherOrder/fail_hof-910.xq 1970-01-01 00:00:00 +0000 |
561 | @@ -1,10 +0,0 @@ |
562 | -xquery version "3.0"; |
563 | -(: Higher Order Functions :) |
564 | -(: In SequenceType syntax, Result type required if argument type given :) |
565 | -(: Author - Michael Kay, Saxonica :) |
566 | - |
567 | -declare function local:f($x as xs:integer) as xs:integer { |
568 | - $x + 1 |
569 | -}; |
570 | - |
571 | -let $f as function(xs:integer) := local:f#1 |
572 | \ No newline at end of file |
573 | |
574 | === removed file 'test/parser/Queries/HigherOrder/hof-001.xq' |
575 | --- test/parser/Queries/HigherOrder/hof-001.xq 2013-02-07 17:24:36 +0000 |
576 | +++ test/parser/Queries/HigherOrder/hof-001.xq 1970-01-01 00:00:00 +0000 |
577 | @@ -1,10 +0,0 @@ |
578 | -xquery version "3.0"; |
579 | -(: Higher Order Functions :) |
580 | -(: inline function literal, user-defined function :) |
581 | -(: Author - Michael Kay, Saxonica :) |
582 | - |
583 | -declare function local:f($x as xs:integer) as xs:integer { |
584 | - $x + 1 |
585 | -}; |
586 | - |
587 | -let $f := local:f#1 return $f(2) |
588 | \ No newline at end of file |
589 | |
590 | === removed file 'test/parser/Queries/HigherOrder/hof-002.xq' |
591 | --- test/parser/Queries/HigherOrder/hof-002.xq 2013-02-07 17:24:36 +0000 |
592 | +++ test/parser/Queries/HigherOrder/hof-002.xq 1970-01-01 00:00:00 +0000 |
593 | @@ -1,14 +0,0 @@ |
594 | -xquery version "3.0"; |
595 | -(: Higher Order Functions :) |
596 | -(: inline function literal, user-defined function :) |
597 | -(: Author - Michael Kay, Saxonica :) |
598 | - |
599 | -declare function local:f() as xs:integer { |
600 | - 42 |
601 | -}; |
602 | - |
603 | -declare function local:f($x as xs:integer) as xs:integer { |
604 | - $x + 1 |
605 | -}; |
606 | - |
607 | -let $f := local:f#0 return $f() |
608 | \ No newline at end of file |
609 | |
610 | === removed file 'test/parser/Queries/HigherOrder/hof-003.lib' |
611 | --- test/parser/Queries/HigherOrder/hof-003.lib 2013-02-07 17:24:36 +0000 |
612 | +++ test/parser/Queries/HigherOrder/hof-003.lib 1970-01-01 00:00:00 +0000 |
613 | @@ -1,10 +0,0 @@ |
614 | -xquery version "3.0"; |
615 | -module namespace m="http://example.com/hof-003"; |
616 | - |
617 | -declare function m:f() as xs:integer { |
618 | - 42 |
619 | -}; |
620 | - |
621 | -declare function m:f($x as xs:integer) as xs:integer { |
622 | - $x + 1 |
623 | -}; |
624 | \ No newline at end of file |
625 | |
626 | === removed file 'test/parser/Queries/HigherOrder/hof-003.xq' |
627 | --- test/parser/Queries/HigherOrder/hof-003.xq 2013-02-07 17:24:36 +0000 |
628 | +++ test/parser/Queries/HigherOrder/hof-003.xq 1970-01-01 00:00:00 +0000 |
629 | @@ -1,8 +0,0 @@ |
630 | -xquery version "3.0"; |
631 | -(: Higher Order Functions :) |
632 | -(: inline function literal, imported user-defined function :) |
633 | -(: Author - Michael Kay, Saxonica :) |
634 | - |
635 | -import module namespace m="http://example.com/hof-003" at "hof-003.lib"; |
636 | - |
637 | -let $f := m:f#1 return $f(17) |
638 | \ No newline at end of file |
639 | |
640 | === removed file 'test/parser/Queries/HigherOrder/hof-004.xq' |
641 | --- test/parser/Queries/HigherOrder/hof-004.xq 2013-02-07 17:24:36 +0000 |
642 | +++ test/parser/Queries/HigherOrder/hof-004.xq 1970-01-01 00:00:00 +0000 |
643 | @@ -1,7 +0,0 @@ |
644 | -xquery version "3.0"; |
645 | -(: Higher Order Functions :) |
646 | -(: inline function literal, system function :) |
647 | -(: Author - Michael Kay, Saxonica :) |
648 | - |
649 | - |
650 | -let $f := fn:round#1 return $f(1.2345) |
651 | \ No newline at end of file |
652 | |
653 | === removed file 'test/parser/Queries/HigherOrder/hof-007.xq' |
654 | --- test/parser/Queries/HigherOrder/hof-007.xq 2013-02-07 17:24:36 +0000 |
655 | +++ test/parser/Queries/HigherOrder/hof-007.xq 1970-01-01 00:00:00 +0000 |
656 | @@ -1,9 +0,0 @@ |
657 | -xquery version "3.0"; |
658 | -(: Higher Order Functions :) |
659 | -(: inline function literal, constructor function, default namespace :) |
660 | -(: Author - Michael Kay, Saxonica :) |
661 | - |
662 | -declare default function namespace "http://www.w3.org/2001/XMLSchema"; |
663 | - |
664 | - |
665 | -let $f := date#1 return $f('2008-01-31') |
666 | \ No newline at end of file |
667 | |
668 | === removed file 'test/parser/Queries/HigherOrder/hof-008.xq' |
669 | --- test/parser/Queries/HigherOrder/hof-008.xq 2013-02-07 17:24:36 +0000 |
670 | +++ test/parser/Queries/HigherOrder/hof-008.xq 1970-01-01 00:00:00 +0000 |
671 | @@ -1,7 +0,0 @@ |
672 | -xquery version "3.0"; |
673 | -(: Higher Order Functions :) |
674 | -(: inline function literal, constructor function, non default namespace :) |
675 | -(: Author - Michael Kay, Saxonica :) |
676 | - |
677 | - |
678 | -let $f := xs:date#1 return $f('2008-01-31') |
679 | \ No newline at end of file |
680 | |
681 | === removed file 'test/parser/Queries/HigherOrder/hof-009.xq' |
682 | --- test/parser/Queries/HigherOrder/hof-009.xq 2013-02-07 17:24:36 +0000 |
683 | +++ test/parser/Queries/HigherOrder/hof-009.xq 1970-01-01 00:00:00 +0000 |
684 | @@ -1,9 +0,0 @@ |
685 | -xquery version "3.0"; |
686 | -(: Higher Order Functions :) |
687 | -(: inline function literal, constructor function, used-defined atomic type :) |
688 | -(: Author - Michael Kay, Saxonica :) |
689 | - |
690 | -import schema namespace a = "http://www.w3.org/XQueryTest/userDefinedTypes"; |
691 | - |
692 | - |
693 | -let $f := a:hatsize#1 return ($f(8) instance of a:hatsize) |
694 | \ No newline at end of file |
695 | |
696 | === removed file 'test/parser/Queries/HigherOrder/hof-016.xq' |
697 | --- test/parser/Queries/HigherOrder/hof-016.xq 2013-02-07 17:24:36 +0000 |
698 | +++ test/parser/Queries/HigherOrder/hof-016.xq 1970-01-01 00:00:00 +0000 |
699 | @@ -1,11 +0,0 @@ |
700 | -xquery version "3.0"; |
701 | -(: Higher Order Functions :) |
702 | -(: Function expecting a function :) |
703 | -(: Author - Michael Kay, Saxonica :) |
704 | - |
705 | -declare function local:case($x as function(*), $y as xs:string) as xs:string { |
706 | - $x($y) |
707 | -}; |
708 | - |
709 | - |
710 | -local:case(upper-case#1, "Mike"), local:case(lower-case#1, "Mike") |
711 | |
712 | === removed file 'test/parser/Queries/HigherOrder/hof-017.xq' |
713 | --- test/parser/Queries/HigherOrder/hof-017.xq 2013-02-07 17:24:36 +0000 |
714 | +++ test/parser/Queries/HigherOrder/hof-017.xq 1970-01-01 00:00:00 +0000 |
715 | @@ -1,11 +0,0 @@ |
716 | -xquery version "3.0"; |
717 | -(: Higher Order Functions :) |
718 | -(: Function expecting a function, full signature :) |
719 | -(: Author - Michael Kay, Saxonica :) |
720 | - |
721 | -declare function local:case($x as function(xs:string?) as xs:string, $y as xs:string) as xs:string { |
722 | - $x($y) |
723 | -}; |
724 | - |
725 | - |
726 | -local:case(upper-case#1, "Mike"), local:case(lower-case#1, "Mike") |
727 | \ No newline at end of file |
728 | |
729 | === removed file 'test/parser/Queries/HigherOrder/hof-018.xq' |
730 | --- test/parser/Queries/HigherOrder/hof-018.xq 2013-02-07 17:24:36 +0000 |
731 | +++ test/parser/Queries/HigherOrder/hof-018.xq 1970-01-01 00:00:00 +0000 |
732 | @@ -1,15 +0,0 @@ |
733 | -xquery version "3.0"; |
734 | -(: Higher Order Functions :) |
735 | -(: Function expecting a function, caller supplies local function :) |
736 | -(: Author - Michael Kay, Saxonica :) |
737 | - |
738 | -declare function local:scramble($x as function(xs:string) as xs:string, $y as xs:string) as xs:string { |
739 | - $x($y) |
740 | -}; |
741 | - |
742 | -declare function local:rot13($x as xs:string) as xs:string { |
743 | - translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm") |
744 | -}; |
745 | - |
746 | - |
747 | -local:scramble(local:rot13#1, "mike") |
748 | \ No newline at end of file |
749 | |
750 | === removed file 'test/parser/Queries/HigherOrder/hof-019.xq' |
751 | --- test/parser/Queries/HigherOrder/hof-019.xq 2013-02-07 17:24:36 +0000 |
752 | +++ test/parser/Queries/HigherOrder/hof-019.xq 1970-01-01 00:00:00 +0000 |
753 | @@ -1,15 +0,0 @@ |
754 | -xquery version "3.0"; |
755 | -(: Higher Order Functions :) |
756 | -(: Function expecting a function, caller supplies local function :) |
757 | -(: Author - Michael Kay, Saxonica :) |
758 | - |
759 | -declare function local:scramble($x as function(*), $y as xs:string) as xs:string { |
760 | - $x($y) |
761 | -}; |
762 | - |
763 | -declare function local:rot13($x as xs:string) as xs:string { |
764 | - translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm") |
765 | -}; |
766 | - |
767 | - |
768 | -local:scramble(local:rot13#1, "mike") |
769 | |
770 | === removed file 'test/parser/Queries/HigherOrder/hof-020.xq' |
771 | --- test/parser/Queries/HigherOrder/hof-020.xq 2013-02-07 17:24:36 +0000 |
772 | +++ test/parser/Queries/HigherOrder/hof-020.xq 1970-01-01 00:00:00 +0000 |
773 | @@ -1,10 +0,0 @@ |
774 | -xquery version "3.0"; |
775 | -(: Higher Order Functions :) |
776 | -(: Function expecting a function, caller supplies inline function :) |
777 | -(: Author - Michael Kay, Saxonica :) |
778 | - |
779 | -declare function local:scramble($x as function(*), $y as xs:string) as xs:string { |
780 | - $x($y) |
781 | -}; |
782 | - |
783 | -local:scramble(function($x){translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm")}, "john") |
784 | |
785 | === removed file 'test/parser/Queries/HigherOrder/hof-021.xq' |
786 | --- test/parser/Queries/HigherOrder/hof-021.xq 2013-02-07 17:24:36 +0000 |
787 | +++ test/parser/Queries/HigherOrder/hof-021.xq 1970-01-01 00:00:00 +0000 |
788 | @@ -1,10 +0,0 @@ |
789 | -xquery version "3.0"; |
790 | -(: Higher Order Functions :) |
791 | -(: Function expecting a function, caller supplies inline function. Needs function coercion :) |
792 | -(: Author - Michael Kay, Saxonica :) |
793 | - |
794 | -declare function local:scramble($x as function(xs:string) as xs:string, $y as xs:string) as xs:string { |
795 | - $x($y) |
796 | -}; |
797 | - |
798 | -local:scramble(function($x){translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm")}, "john") |
799 | \ No newline at end of file |
800 | |
801 | === removed file 'test/parser/Queries/HigherOrder/hof-022.xq' |
802 | --- test/parser/Queries/HigherOrder/hof-022.xq 2013-02-07 17:24:36 +0000 |
803 | +++ test/parser/Queries/HigherOrder/hof-022.xq 1970-01-01 00:00:00 +0000 |
804 | @@ -1,11 +0,0 @@ |
805 | -xquery version "3.0"; |
806 | -(: Higher Order Functions :) |
807 | -(: Name and arity of a user-defined function :) |
808 | -(: Author - Michael Kay, Saxonica :) |
809 | - |
810 | -declare function local:scramble($x as function(xs:string) as xs:string, $y as xs:string) as xs:string { |
811 | - $x($y) |
812 | -}; |
813 | - |
814 | -let $n := function-name(local:scramble#2) |
815 | -return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity(local:scramble#2)) |
816 | \ No newline at end of file |
817 | |
818 | === removed file 'test/parser/Queries/HigherOrder/hof-023.xq' |
819 | --- test/parser/Queries/HigherOrder/hof-023.xq 2013-02-07 17:24:36 +0000 |
820 | +++ test/parser/Queries/HigherOrder/hof-023.xq 1970-01-01 00:00:00 +0000 |
821 | @@ -1,8 +0,0 @@ |
822 | -xquery version "3.0"; |
823 | -(: Higher Order Functions :) |
824 | -(: Name and arity of a system function :) |
825 | -(: Author - Michael Kay, Saxonica :) |
826 | - |
827 | -let $f := fn:function-name#1 |
828 | -let $n := function-name($f) |
829 | -return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity($f)) |
830 | \ No newline at end of file |
831 | |
832 | === removed file 'test/parser/Queries/HigherOrder/hof-024.xq' |
833 | --- test/parser/Queries/HigherOrder/hof-024.xq 2013-02-07 17:24:36 +0000 |
834 | +++ test/parser/Queries/HigherOrder/hof-024.xq 1970-01-01 00:00:00 +0000 |
835 | @@ -1,8 +0,0 @@ |
836 | -xquery version "3.0"; |
837 | -(: Higher Order Functions :) |
838 | -(: Name and arity of a constructor function :) |
839 | -(: Author - Michael Kay, Saxonica :) |
840 | - |
841 | -let $f := xs:dateTime#1 |
842 | -let $n := function-name($f) |
843 | -return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity($f)) |
844 | \ No newline at end of file |
845 | |
846 | === removed file 'test/parser/Queries/HigherOrder/hof-025.xq' |
847 | --- test/parser/Queries/HigherOrder/hof-025.xq 2013-02-07 17:24:36 +0000 |
848 | +++ test/parser/Queries/HigherOrder/hof-025.xq 1970-01-01 00:00:00 +0000 |
849 | @@ -1,8 +0,0 @@ |
850 | -xquery version "3.0"; |
851 | -(: Higher Order Functions :) |
852 | -(: Name and arity of a concat function :) |
853 | -(: Author - Michael Kay, Saxonica :) |
854 | - |
855 | -let $f := concat#123456 |
856 | -let $n := function-name($f) |
857 | -return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity($f)) |
858 | \ No newline at end of file |
859 | |
860 | === removed file 'test/parser/Queries/HigherOrder/hof-026.xq' |
861 | --- test/parser/Queries/HigherOrder/hof-026.xq 2013-02-07 17:24:36 +0000 |
862 | +++ test/parser/Queries/HigherOrder/hof-026.xq 1970-01-01 00:00:00 +0000 |
863 | @@ -1,9 +0,0 @@ |
864 | -xquery version "3.0"; |
865 | -(: Higher Order Functions :) |
866 | -(: Name and arity of an inline function :) |
867 | -(: Author - Michael Kay, Saxonica :) |
868 | - |
869 | -let $f := function($x as xs:string) as xs:string { upper-case($x) } |
870 | -let $n := function-name($f) |
871 | -return <a loc="{local-name-from-QName($n)}" uri="{namespace-uri-from-QName($n)}" arity="{function-arity($f)}" |
872 | - eloc="{empty(local-name-from-QName($n))}" euri="{empty(namespace-uri-from-QName($n))}"/> |
873 | \ No newline at end of file |
874 | |
875 | === removed file 'test/parser/Queries/HigherOrder/hof-027.xq' |
876 | --- test/parser/Queries/HigherOrder/hof-027.xq 2013-02-07 17:24:36 +0000 |
877 | +++ test/parser/Queries/HigherOrder/hof-027.xq 1970-01-01 00:00:00 +0000 |
878 | @@ -1,8 +0,0 @@ |
879 | -xquery version "3.0"; |
880 | -(: Higher Order Functions :) |
881 | -(: Curry a system function :) |
882 | -(: Author - Michael Kay, Saxonica :) |
883 | - |
884 | -let $f := fn:partial-apply(fn:contains#2, "e", 2) |
885 | -for $s in ("Mike", "John", "Dave", "Mary", "Jane") |
886 | -return $f($s) |
887 | \ No newline at end of file |
888 | |
889 | === removed file 'test/parser/Queries/HigherOrder/hof-028.xq' |
890 | --- test/parser/Queries/HigherOrder/hof-028.xq 2013-02-07 17:24:36 +0000 |
891 | +++ test/parser/Queries/HigherOrder/hof-028.xq 1970-01-01 00:00:00 +0000 |
892 | @@ -1,10 +0,0 @@ |
893 | -xquery version "3.0"; |
894 | -(: Higher Order Functions :) |
895 | -(: Return an inline function from a user-defined function. Needs function coercion :) |
896 | -(: Author - Michael Kay, Saxonica :) |
897 | - |
898 | -declare function local:splitter() as (function(xs:string) as xs:string*) { |
899 | - function($x as xs:string) { tokenize($x, '\s') } |
900 | -}; |
901 | - |
902 | -string-join(local:splitter()("A nice cup of tea"), '|') |
903 | \ No newline at end of file |
904 | |
905 | === removed file 'test/parser/Queries/HigherOrder/hof-029.xq' |
906 | --- test/parser/Queries/HigherOrder/hof-029.xq 2013-02-07 17:24:36 +0000 |
907 | +++ test/parser/Queries/HigherOrder/hof-029.xq 1970-01-01 00:00:00 +0000 |
908 | @@ -1,10 +0,0 @@ |
909 | -xquery version "3.0"; |
910 | -(: Higher Order Functions :) |
911 | -(: Return an inline function that uses internal variables. Needs function coercion :) |
912 | -(: Author - Michael Kay, Saxonica :) |
913 | - |
914 | -declare function local:splitter() as (function(xs:string) as xs:string+)? { |
915 | - function($x as xs:string) { for $i in tokenize($x, '\s') return upper-case($i)} |
916 | -}; |
917 | - |
918 | -string-join(local:splitter()("A nice cup of tea"), '|') |
919 | \ No newline at end of file |
920 | |
921 | === removed file 'test/parser/Queries/HigherOrder/hof-030.xq' |
922 | --- test/parser/Queries/HigherOrder/hof-030.xq 2013-02-07 17:24:36 +0000 |
923 | +++ test/parser/Queries/HigherOrder/hof-030.xq 1970-01-01 00:00:00 +0000 |
924 | @@ -1,12 +0,0 @@ |
925 | -xquery version "3.0"; |
926 | -(: Higher Order Functions :) |
927 | -(: Return an inline function that uses global variables :) |
928 | -(: Author - Michael Kay, Saxonica :) |
929 | - |
930 | -declare variable $sep as xs:string external := "\s"; |
931 | - |
932 | -declare function local:splitter() as (function(xs:string) as xs:string*)? { |
933 | - function($x as xs:string) { for $i in tokenize($x, $sep) return upper-case($i)} |
934 | -}; |
935 | - |
936 | -string-join(local:splitter()("A nice cup of tea"), '|') |
937 | \ No newline at end of file |
938 | |
939 | === removed file 'test/parser/Queries/HigherOrder/hof-031.xq' |
940 | --- test/parser/Queries/HigherOrder/hof-031.xq 2013-02-07 17:24:36 +0000 |
941 | +++ test/parser/Queries/HigherOrder/hof-031.xq 1970-01-01 00:00:00 +0000 |
942 | @@ -1,10 +0,0 @@ |
943 | -xquery version "3.0"; |
944 | -(: Higher Order Functions :) |
945 | -(: Return an inline function that uses local parameters :) |
946 | -(: Author - Michael Kay, Saxonica :) |
947 | - |
948 | -declare function local:splitter($sep as xs:string) as (function(xs:string) as xs:string*) { |
949 | - function($x as xs:string) { for $i in tokenize($x, $sep) return upper-case($i)} |
950 | -}; |
951 | - |
952 | -string-join(local:splitter("\s")("A nice cup of tea"), '|') |
953 | \ No newline at end of file |
954 | |
955 | === removed file 'test/parser/Queries/HigherOrder/hof-032.xq' |
956 | --- test/parser/Queries/HigherOrder/hof-032.xq 2013-02-07 17:24:36 +0000 |
957 | +++ test/parser/Queries/HigherOrder/hof-032.xq 1970-01-01 00:00:00 +0000 |
958 | @@ -1,7 +0,0 @@ |
959 | -xquery version "3.0"; |
960 | -(: Higher Order Functions :) |
961 | -(: Parenthesized expression in a function call :) |
962 | -(: Author - Michael Kay, Saxonica :) |
963 | - |
964 | -(if (current-date() gt xs:date('2000-12-31')) then upper-case#1 else lower-case#1)("Mike") |
965 | - |
966 | |
967 | === removed file 'test/parser/Queries/HigherOrder/hof-033.xq' |
968 | --- test/parser/Queries/HigherOrder/hof-033.xq 2013-02-07 17:24:36 +0000 |
969 | +++ test/parser/Queries/HigherOrder/hof-033.xq 1970-01-01 00:00:00 +0000 |
970 | @@ -1,7 +0,0 @@ |
971 | -xquery version "3.0"; |
972 | -(: Higher Order Functions :) |
973 | -(: Context item is a function item :) |
974 | -(: Author - Michael Kay, Saxonica :) |
975 | - |
976 | -function-name((upper-case#1, lower-case#1)[.("Mike") = "MIKE"]) |
977 | - |
978 | |
979 | === removed file 'test/parser/Queries/HigherOrder/hof-034.xq' |
980 | --- test/parser/Queries/HigherOrder/hof-034.xq 2013-02-07 17:24:36 +0000 |
981 | +++ test/parser/Queries/HigherOrder/hof-034.xq 1970-01-01 00:00:00 +0000 |
982 | @@ -1,7 +0,0 @@ |
983 | -xquery version "3.0"; |
984 | -(: Higher Order Functions :) |
985 | -(: ordered{} applied to a function item :) |
986 | -(: Author - Michael Kay, Saxonica :) |
987 | - |
988 | -function-name((upper-case#1, lower-case#1)[ordered{.}("Mike") = "MIKE"]) |
989 | - |
990 | |
991 | === removed file 'test/parser/Queries/HigherOrder/hof-035.xq' |
992 | --- test/parser/Queries/HigherOrder/hof-035.xq 2013-02-07 17:24:36 +0000 |
993 | +++ test/parser/Queries/HigherOrder/hof-035.xq 1970-01-01 00:00:00 +0000 |
994 | @@ -1,7 +0,0 @@ |
995 | -xquery version "3.0"; |
996 | -(: Higher Order Functions :) |
997 | -(: unordered{} applied to a function item :) |
998 | -(: Author - Michael Kay, Saxonica :) |
999 | - |
1000 | -function-name((upper-case#1, lower-case#1)[ordered{.}("Mike") = "MIKE"]) |
1001 | - |
1002 | |
1003 | === removed file 'test/parser/Queries/HigherOrder/hof-036.xq' |
1004 | --- test/parser/Queries/HigherOrder/hof-036.xq 2013-02-07 17:24:36 +0000 |
1005 | +++ test/parser/Queries/HigherOrder/hof-036.xq 1970-01-01 00:00:00 +0000 |
1006 | @@ -1,7 +0,0 @@ |
1007 | -xquery version "3.0"; |
1008 | -(: Higher Order Functions :) |
1009 | -(: Heterogeneous sequence of atomics and functions on rhs of "/" - not clear if this is allowed :) |
1010 | -(: Author - Michael Kay, Saxonica :) |
1011 | - |
1012 | -(<a b="3"/>/(string(@b), upper-case#1, 17))[. instance of xs:anyAtomicType] |
1013 | - |
1014 | |
1015 | === removed file 'test/parser/Queries/HigherOrder/hof-037.xq' |
1016 | --- test/parser/Queries/HigherOrder/hof-037.xq 2013-02-07 17:24:36 +0000 |
1017 | +++ test/parser/Queries/HigherOrder/hof-037.xq 1970-01-01 00:00:00 +0000 |
1018 | @@ -1,14 +0,0 @@ |
1019 | -xquery version "3.0"; |
1020 | -(: Higher Order Functions :) |
1021 | -(: instance-of tests on user-defined function, varying the argument types - all true :) |
1022 | -(: Author - Michael Kay, Saxonica :) |
1023 | - |
1024 | -declare function local:f($x as xs:long, $y as xs:NCName) as element(e) { |
1025 | - <e x="{$x}" y="{$y}"/> |
1026 | -}; |
1027 | - |
1028 | -local:f#2 instance of function(*), |
1029 | -local:f#2 instance of function(xs:long, xs:NCName) as element(e), |
1030 | -local:f#2 instance of function(xs:anyAtomicType?, xs:anyAtomicType?) as element(e), |
1031 | -local:f#2 instance of function(item()*, item()*) as element(e) |
1032 | - |
1033 | |
1034 | === removed file 'test/parser/Queries/HigherOrder/hof-038.xq' |
1035 | --- test/parser/Queries/HigherOrder/hof-038.xq 2013-02-07 17:24:36 +0000 |
1036 | +++ test/parser/Queries/HigherOrder/hof-038.xq 1970-01-01 00:00:00 +0000 |
1037 | @@ -1,15 +0,0 @@ |
1038 | -xquery version "3.0"; |
1039 | -(: Higher Order Functions :) |
1040 | -(: instance-of tests on user-defined function, varying the argument types - all false :) |
1041 | -(: Author - Michael Kay, Saxonica :) |
1042 | - |
1043 | -declare function local:f($x as xs:long?, $y as xs:NCName?) as element(e) { |
1044 | - <e x="{$x}" y="{$y}"/> |
1045 | -}; |
1046 | - |
1047 | -local:f#2 instance of function(xs:int?, xs:NCName?) as element(e), |
1048 | -local:f#2 instance of function(xs:long?) as element(e), |
1049 | -local:f#2 instance of function(xs:long?, xs:NCName?, item()*) as element(e), |
1050 | -local:f#2 instance of function(xs:long, xs:anyAtomicType?) as element(e), |
1051 | -local:f#2 instance of function(item()+, item()+) as element(e) |
1052 | - |
1053 | |
1054 | === removed file 'test/parser/Queries/HigherOrder/hof-039.xq' |
1055 | --- test/parser/Queries/HigherOrder/hof-039.xq 2013-02-07 17:24:36 +0000 |
1056 | +++ test/parser/Queries/HigherOrder/hof-039.xq 1970-01-01 00:00:00 +0000 |
1057 | @@ -1,19 +0,0 @@ |
1058 | -xquery version "3.0"; |
1059 | -(: Higher Order Functions :) |
1060 | -(: instance-of tests on user-defined function, varying the result types :) |
1061 | -(: Author - Michael Kay, Saxonica :) |
1062 | - |
1063 | -declare function local:f($x as xs:long, $y as xs:NCName) as element(e)? { |
1064 | - <e x="{$x}" y="{$y}"/> |
1065 | -}; |
1066 | - |
1067 | -local:f#2 instance of function(xs:long, xs:NCName) as element(), |
1068 | -local:f#2 instance of function(xs:long, xs:NCName) as element()+, |
1069 | -local:f#2 instance of function(xs:long, xs:NCName) as element()?, |
1070 | -local:f#2 instance of function(xs:long, xs:NCName) as element()*, |
1071 | -local:f#2 instance of function(xs:long, xs:NCName) as element(e)*, |
1072 | -local:f#2 instance of function(xs:long, xs:NCName) as element(e, xs:anyType)*, |
1073 | -local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:anyType)?, |
1074 | -local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:untyped)? |
1075 | - |
1076 | - |
1077 | |
1078 | === removed file 'test/parser/Queries/HigherOrder/hof-040.xq' |
1079 | --- test/parser/Queries/HigherOrder/hof-040.xq 2013-02-07 17:24:36 +0000 |
1080 | +++ test/parser/Queries/HigherOrder/hof-040.xq 1970-01-01 00:00:00 +0000 |
1081 | @@ -1,11 +0,0 @@ |
1082 | -xquery version "3.0"; |
1083 | -(: Higher Order Functions :) |
1084 | -(: Pass a sequence of functions that require coercion in different ways :) |
1085 | -(: Author - Michael Kay, Saxonica :) |
1086 | - |
1087 | -declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { |
1088 | - for $f in $fns return $f($s) |
1089 | -}; |
1090 | - |
1091 | -let $ops := (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, partial-apply(substring-before#2, ' ', 2)) |
1092 | -return string-join(local:apply($ops, 'Michael Kay'), '~') |
1093 | \ No newline at end of file |
1094 | |
1095 | === removed file 'test/parser/Queries/HigherOrder/hof-041.xq' |
1096 | --- test/parser/Queries/HigherOrder/hof-041.xq 2013-02-07 17:24:36 +0000 |
1097 | +++ test/parser/Queries/HigherOrder/hof-041.xq 1970-01-01 00:00:00 +0000 |
1098 | @@ -1,10 +0,0 @@ |
1099 | -xquery version "3.0"; |
1100 | -(: Higher Order Functions :) |
1101 | -(: Return a sequence of functions that require coercion in different ways :) |
1102 | -(: Author - Michael Kay, Saxonica :) |
1103 | - |
1104 | -declare function local:ops() as (function(xs:string) as xs:string)* { |
1105 | - (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, partial-apply(substring-before#2, ' ', 2)) |
1106 | -}; |
1107 | - |
1108 | -string-join(for $f in local:ops() return $f('Michael Kay'), '~') |
1109 | \ No newline at end of file |
1110 | |
1111 | === removed file 'test/parser/Queries/HigherOrder/hof-042.xq' |
1112 | --- test/parser/Queries/HigherOrder/hof-042.xq 2013-02-07 17:24:36 +0000 |
1113 | +++ test/parser/Queries/HigherOrder/hof-042.xq 1970-01-01 00:00:00 +0000 |
1114 | @@ -1,14 +0,0 @@ |
1115 | -xquery version "3.0"; |
1116 | -(: Higher Order Functions :) |
1117 | -(: Implicit atomization works for various kinds of functions :) |
1118 | -(: Author - Michael Kay, Saxonica :) |
1119 | - |
1120 | -declare function local:lower-case($x as xs:string) as xs:string { |
1121 | - concat("'", fn:lower-case($x), "'") |
1122 | -}; |
1123 | - |
1124 | -declare function local:ops() as (function(xs:string) as xs:string)* { |
1125 | - (upper-case#1, local:lower-case#1, function($x){translate($x, 'e', 'i')}, partial-apply(substring-before#2, ' ', 2)) |
1126 | -}; |
1127 | - |
1128 | -string-join(for $f in local:ops() return $f(<a name="Michael Kay"/>/@name), '~') |
1129 | \ No newline at end of file |
1130 | |
1131 | === removed file 'test/parser/Queries/HigherOrder/hof-043.xq' |
1132 | --- test/parser/Queries/HigherOrder/hof-043.xq 2013-02-07 17:24:36 +0000 |
1133 | +++ test/parser/Queries/HigherOrder/hof-043.xq 1970-01-01 00:00:00 +0000 |
1134 | @@ -1,15 +0,0 @@ |
1135 | -xquery version "3.0"; |
1136 | -(: Higher Order Functions :) |
1137 | -(: untypedAtomic conversion works for various kinds of functions :) |
1138 | -(: Author - Michael Kay, Saxonica :) |
1139 | - |
1140 | -declare function local:round($x as xs:double) as xs:double { |
1141 | - fn:floor($x) |
1142 | -}; |
1143 | - |
1144 | -declare function local:ops() as (function(xs:double) as xs:double)* { |
1145 | - (abs#1, local:round#1, function($x){$x+1}, partial-apply(round-half-to-even#2, 2, 2)) |
1146 | -}; |
1147 | - |
1148 | - |
1149 | -string-join(for $f in local:ops() return string($f(xs:untypedAtomic('123.456'))), '~') |
1150 | \ No newline at end of file |
1151 | |
1152 | === removed file 'test/parser/Queries/HigherOrder/hof-044.xq' |
1153 | --- test/parser/Queries/HigherOrder/hof-044.xq 2013-02-07 17:24:36 +0000 |
1154 | +++ test/parser/Queries/HigherOrder/hof-044.xq 1970-01-01 00:00:00 +0000 |
1155 | @@ -1,15 +0,0 @@ |
1156 | -xquery version "3.0"; |
1157 | -(: Higher Order Functions :) |
1158 | -(: numeric promotion works for various kinds of functions :) |
1159 | -(: Author - Michael Kay, Saxonica :) |
1160 | - |
1161 | -declare function local:round($x as xs:double) as xs:double { |
1162 | - fn:floor($x) |
1163 | -}; |
1164 | - |
1165 | -declare function local:ops() as (function(xs:double) as xs:double)* { |
1166 | - (abs#1, local:round#1, function($x as xs:float){$x+1}, partial-apply(round-half-to-even#2, 2, 2)) |
1167 | -}; |
1168 | - |
1169 | - |
1170 | -string-join(for $f in local:ops() return string(round-half-to-even($f(xs:decimal('123.456')), 4)), '~') |
1171 | \ No newline at end of file |
1172 | |
1173 | === removed file 'test/parser/Queries/HigherOrder/hof-045.xq' |
1174 | --- test/parser/Queries/HigherOrder/hof-045.xq 2013-02-07 17:24:36 +0000 |
1175 | +++ test/parser/Queries/HigherOrder/hof-045.xq 1970-01-01 00:00:00 +0000 |
1176 | @@ -1,12 +0,0 @@ |
1177 | -xquery version "3.0"; |
1178 | -(: Higher Order Functions :) |
1179 | -(: partial-apply supplying a function parameter :) |
1180 | -(: Author - Michael Kay, Saxonica :) |
1181 | - |
1182 | -declare function local:round($x as xs:double, $algorithm as (function(xs:double) as xs:double)) as xs:double { |
1183 | - $algorithm($x) |
1184 | -}; |
1185 | - |
1186 | -declare variable $roundToCeiling := partial-apply(local:round#2, ceiling#1, 2); |
1187 | - |
1188 | -$roundToCeiling(12.4) |
1189 | \ No newline at end of file |
1190 | |
1191 | === removed file 'test/parser/Queries/HigherOrder/hof-046.xq' |
1192 | --- test/parser/Queries/HigherOrder/hof-046.xq 2013-02-07 17:24:36 +0000 |
1193 | +++ test/parser/Queries/HigherOrder/hof-046.xq 1970-01-01 00:00:00 +0000 |
1194 | @@ -1,17 +0,0 @@ |
1195 | -xquery version "3.0"; |
1196 | -(: Higher Order Functions :) |
1197 | -(: Return an inline function that uses inner and outer local variables :) |
1198 | -(: Author - Michael Kay, Saxonica :) |
1199 | - |
1200 | -declare function local:splitter($x as xs:string) as (function() as xs:string*)* { |
1201 | - for $sep in ('\s', ',', '!') return function() { |
1202 | - for $i in tokenize($x, $sep) return upper-case($i) |
1203 | - } |
1204 | -}; |
1205 | - |
1206 | -<out>{ |
1207 | - for $f as function(*) in local:splitter("How nice! Thank you, I enjoyed that.") |
1208 | - return <tokens>{ |
1209 | - for $t in $f() return <token>{$t}</token> |
1210 | - }</tokens> |
1211 | -}</out> |
1212 | |
1213 | === removed file 'test/parser/Queries/HigherOrder/hof-047.xq' |
1214 | --- test/parser/Queries/HigherOrder/hof-047.xq 2013-02-07 17:24:36 +0000 |
1215 | +++ test/parser/Queries/HigherOrder/hof-047.xq 1970-01-01 00:00:00 +0000 |
1216 | @@ -1,20 +0,0 @@ |
1217 | -xquery version "3.0"; |
1218 | -(: Higher Order Functions :) |
1219 | -(: Nested inline functions referencing grandfather local variables :) |
1220 | -(: Author - Michael Kay, Saxonica :) |
1221 | - |
1222 | -declare function local:splitter($x as xs:string) as (function() as xs:string*)* { |
1223 | - for $sep in ('\s', ',', '!') return function() { |
1224 | - for $i in tokenize($x, $sep) return |
1225 | - let $f := function(){ concat($sep, ':', upper-case($i)) } |
1226 | - return $f() |
1227 | - |
1228 | - } |
1229 | -}; |
1230 | - |
1231 | -<out>{ |
1232 | - for $f as function(*) in local:splitter("How nice! Thank you, I enjoyed that.") |
1233 | - return <tokens>{ |
1234 | - for $t in $f() return <token>{$t}</token> |
1235 | - }</tokens> |
1236 | -}</out> |
1237 | |
1238 | === removed file 'test/parser/Queries/HigherOrder/hof-902.xq' |
1239 | --- test/parser/Queries/HigherOrder/hof-902.xq 2013-02-07 17:24:36 +0000 |
1240 | +++ test/parser/Queries/HigherOrder/hof-902.xq 1970-01-01 00:00:00 +0000 |
1241 | @@ -1,10 +0,0 @@ |
1242 | -xquery version "3.0"; |
1243 | -(: Higher Order Functions :) |
1244 | -(: inline function literal, unknown user-defined function :) |
1245 | -(: Author - Michael Kay, Saxonica :) |
1246 | - |
1247 | -declare function local:f($x as xs:integer) as xs:integer { |
1248 | - $x + 1 |
1249 | -}; |
1250 | - |
1251 | -let $f := local:f#3 return $f(2) |
1252 | \ No newline at end of file |
1253 | |
1254 | === removed file 'test/parser/Queries/HigherOrder/hof-903.xq' |
1255 | --- test/parser/Queries/HigherOrder/hof-903.xq 2013-02-07 17:24:36 +0000 |
1256 | +++ test/parser/Queries/HigherOrder/hof-903.xq 1970-01-01 00:00:00 +0000 |
1257 | @@ -1,10 +0,0 @@ |
1258 | -xquery version "3.0"; |
1259 | -(: Higher Order Functions :) |
1260 | -(: inline function literal, unknown function :) |
1261 | -(: Author - Michael Kay, Saxonica :) |
1262 | - |
1263 | -declare function local:f($x as xs:integer) as xs:integer { |
1264 | - $x + 1 |
1265 | -}; |
1266 | - |
1267 | -let $f := xs:date#2 return $f('2008-03-01') |
1268 | \ No newline at end of file |
1269 | |
1270 | === removed file 'test/parser/Queries/HigherOrder/hof-904.xq' |
1271 | --- test/parser/Queries/HigherOrder/hof-904.xq 2013-02-07 17:24:36 +0000 |
1272 | +++ test/parser/Queries/HigherOrder/hof-904.xq 1970-01-01 00:00:00 +0000 |
1273 | @@ -1,10 +0,0 @@ |
1274 | -xquery version "3.0"; |
1275 | -(: Higher Order Functions :) |
1276 | -(: inline function literal, unknown function :) |
1277 | -(: Author - Michael Kay, Saxonica :) |
1278 | - |
1279 | -declare function local:f($x as xs:integer) as xs:integer { |
1280 | - $x + 1 |
1281 | -}; |
1282 | - |
1283 | -let $f := concat#1 return $f('2008-03-01') |
1284 | \ No newline at end of file |
1285 | |
1286 | === removed file 'test/parser/Queries/HigherOrder/hof-905.xq' |
1287 | --- test/parser/Queries/HigherOrder/hof-905.xq 2013-02-07 17:24:36 +0000 |
1288 | +++ test/parser/Queries/HigherOrder/hof-905.xq 1970-01-01 00:00:00 +0000 |
1289 | @@ -1,10 +0,0 @@ |
1290 | -xquery version "3.0"; |
1291 | -(: Higher Order Functions :) |
1292 | -(: apply string() to a function item :) |
1293 | -(: Author - Michael Kay, Saxonica :) |
1294 | - |
1295 | -declare function local:f($x as xs:integer) as xs:integer { |
1296 | - $x + 1 |
1297 | -}; |
1298 | - |
1299 | -string(local:f#1) |
1300 | \ No newline at end of file |
1301 | |
1302 | === removed file 'test/parser/Queries/HigherOrder/hof-906.xq' |
1303 | --- test/parser/Queries/HigherOrder/hof-906.xq 2013-02-07 17:24:36 +0000 |
1304 | +++ test/parser/Queries/HigherOrder/hof-906.xq 1970-01-01 00:00:00 +0000 |
1305 | @@ -1,10 +0,0 @@ |
1306 | -xquery version "3.0"; |
1307 | -(: Higher Order Functions :) |
1308 | -(: apply data() to a function item :) |
1309 | -(: Author - Michael Kay, Saxonica :) |
1310 | - |
1311 | -declare function local:f($x as xs:integer) as xs:integer { |
1312 | - $x + 1 |
1313 | -}; |
1314 | - |
1315 | -exists(data(local:f#1)) |
1316 | \ No newline at end of file |
1317 | |
1318 | === removed file 'test/parser/Queries/HigherOrder/hof-907.xq' |
1319 | --- test/parser/Queries/HigherOrder/hof-907.xq 2013-02-07 17:24:36 +0000 |
1320 | +++ test/parser/Queries/HigherOrder/hof-907.xq 1970-01-01 00:00:00 +0000 |
1321 | @@ -1,10 +0,0 @@ |
1322 | -xquery version "3.0"; |
1323 | -(: Higher Order Functions :) |
1324 | -(: apply deep-equal() to a function item :) |
1325 | -(: Author - Michael Kay, Saxonica :) |
1326 | - |
1327 | -declare function local:f($x as xs:integer) as xs:integer { |
1328 | - $x + 1 |
1329 | -}; |
1330 | - |
1331 | -deep-equal((1,2,3,4,local:f#1), (1,2,3,4,local:f#1)) |
1332 | \ No newline at end of file |
1333 | |
1334 | === removed file 'test/parser/Queries/HigherOrder/hof-908.xq' |
1335 | --- test/parser/Queries/HigherOrder/hof-908.xq 2013-02-07 17:24:36 +0000 |
1336 | +++ test/parser/Queries/HigherOrder/hof-908.xq 1970-01-01 00:00:00 +0000 |
1337 | @@ -1,10 +0,0 @@ |
1338 | -xquery version "3.0"; |
1339 | -(: Higher Order Functions :) |
1340 | -(: atomize a function item implicitly :) |
1341 | -(: Author - Michael Kay, Saxonica :) |
1342 | - |
1343 | -declare function local:f($x as xs:integer) as xs:integer { |
1344 | - $x + 1 |
1345 | -}; |
1346 | - |
1347 | -local:f#1 eq 3 |
1348 | \ No newline at end of file |
1349 | |
1350 | === removed file 'test/parser/Queries/HigherOrder/hof-909.xq' |
1351 | --- test/parser/Queries/HigherOrder/hof-909.xq 2013-02-07 17:24:36 +0000 |
1352 | +++ test/parser/Queries/HigherOrder/hof-909.xq 1970-01-01 00:00:00 +0000 |
1353 | @@ -1,10 +0,0 @@ |
1354 | -xquery version "3.0"; |
1355 | -(: Higher Order Functions :) |
1356 | -(: atomize a function item implicitly :) |
1357 | -(: Author - Michael Kay, Saxonica :) |
1358 | - |
1359 | -declare function local:f($x as xs:integer) as xs:integer { |
1360 | - $x + 1 |
1361 | -}; |
1362 | - |
1363 | -number(local:f#1) |
1364 | \ No newline at end of file |
1365 | |
1366 | === removed file 'test/parser/Queries/HigherOrder/hof-911.xq' |
1367 | --- test/parser/Queries/HigherOrder/hof-911.xq 2013-02-07 17:24:36 +0000 |
1368 | +++ test/parser/Queries/HigherOrder/hof-911.xq 1970-01-01 00:00:00 +0000 |
1369 | @@ -1,7 +0,0 @@ |
1370 | -xquery version "3.0"; |
1371 | -(: Higher Order Functions :) |
1372 | -(: Heterogeneous sequence on rhs of "/" :) |
1373 | -(: Author - Michael Kay, Saxonica :) |
1374 | - |
1375 | -<a b="3"/>/(@b, upper-case#1) |
1376 | - |
1377 | |
1378 | === removed file 'test/parser/Queries/HigherOrder/hof-912.xq' |
1379 | --- test/parser/Queries/HigherOrder/hof-912.xq 2013-02-07 17:24:36 +0000 |
1380 | +++ test/parser/Queries/HigherOrder/hof-912.xq 1970-01-01 00:00:00 +0000 |
1381 | @@ -1,11 +0,0 @@ |
1382 | -xquery version "3.0"; |
1383 | -(: Higher Order Functions :) |
1384 | -(: Pass a sequence of functions that cannot be coerced to the required type :) |
1385 | -(: Author - Michael Kay, Saxonica :) |
1386 | - |
1387 | -declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { |
1388 | - for $f in $fns return $f($s) |
1389 | -}; |
1390 | - |
1391 | -let $ops := (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, partial-apply(substring-before#3, ' ', 2)) |
1392 | -return string-join(local:apply($ops, 'Michael Kay'), '~') |
1393 | \ No newline at end of file |
1394 | |
1395 | === removed file 'test/parser/Queries/HigherOrder/hof-913.xq' |
1396 | --- test/parser/Queries/HigherOrder/hof-913.xq 2013-02-07 17:24:36 +0000 |
1397 | +++ test/parser/Queries/HigherOrder/hof-913.xq 1970-01-01 00:00:00 +0000 |
1398 | @@ -1,11 +0,0 @@ |
1399 | -xquery version "3.0"; |
1400 | -(: Higher Order Functions :) |
1401 | -(: Pass a sequence of functions that cannot be coerced to the required type :) |
1402 | -(: Author - Michael Kay, Saxonica :) |
1403 | - |
1404 | -declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { |
1405 | - for $f in $fns return $f($s) |
1406 | -}; |
1407 | - |
1408 | -let $ops := (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, string-length#1) |
1409 | -return string-join(local:apply($ops, 'Michael Kay'), '~') |
1410 | \ No newline at end of file |
1411 | |
1412 | === removed file 'test/parser/Queries/HigherOrder/hof-914.xq' |
1413 | --- test/parser/Queries/HigherOrder/hof-914.xq 2013-02-07 17:24:36 +0000 |
1414 | +++ test/parser/Queries/HigherOrder/hof-914.xq 1970-01-01 00:00:00 +0000 |
1415 | @@ -1,11 +0,0 @@ |
1416 | -xquery version "3.0"; |
1417 | -(: Higher Order Functions :) |
1418 | -(: Pass a sequence of functions that cannot be coerced to the required type :) |
1419 | -(: Author - Michael Kay, Saxonica :) |
1420 | - |
1421 | -declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { |
1422 | - for $f in $fns return $f($s) |
1423 | -}; |
1424 | - |
1425 | -let $ops := (upper-case#1, lower-case#1, function($x as xs:double){string($x)}) |
1426 | -return string-join(local:apply($ops, 'Michael Kay'), '~') |
1427 | \ No newline at end of file |
1428 | |
1429 | === removed file 'test/parser/Queries/HigherOrder/hof-915.xq' |
1430 | --- test/parser/Queries/HigherOrder/hof-915.xq 2013-02-07 17:24:36 +0000 |
1431 | +++ test/parser/Queries/HigherOrder/hof-915.xq 1970-01-01 00:00:00 +0000 |
1432 | @@ -1,8 +0,0 @@ |
1433 | -xquery version "3.0"; |
1434 | -(: Higher Order Functions :) |
1435 | -(: partial-apply, argument number out of range :) |
1436 | -(: Author - Michael Kay, Saxonica :) |
1437 | - |
1438 | - |
1439 | -let $ops := (partial-apply(substring-before#2, ' ', 3)) |
1440 | -return $ops('Michael Kay') |
1441 | \ No newline at end of file |
1442 | |
1443 | === removed file 'test/parser/Queries/HigherOrder/hof-916.xq' |
1444 | --- test/parser/Queries/HigherOrder/hof-916.xq 2013-02-07 17:24:36 +0000 |
1445 | +++ test/parser/Queries/HigherOrder/hof-916.xq 1970-01-01 00:00:00 +0000 |
1446 | @@ -1,8 +0,0 @@ |
1447 | -xquery version "3.0"; |
1448 | -(: Higher Order Functions :) |
1449 | -(: partial-apply, argument number out of range :) |
1450 | -(: Author - Michael Kay, Saxonica :) |
1451 | - |
1452 | - |
1453 | -let $ops := partial-apply(substring-before#2, ' ', function-arity(true#0) - 7) |
1454 | -return $ops('Michael Kay') |
1455 | \ No newline at end of file |
1456 | |
1457 | === removed file 'test/parser/Queries/HigherOrder/hof-917.xq' |
1458 | --- test/parser/Queries/HigherOrder/hof-917.xq 2013-02-07 17:24:36 +0000 |
1459 | +++ test/parser/Queries/HigherOrder/hof-917.xq 1970-01-01 00:00:00 +0000 |
1460 | @@ -1,8 +0,0 @@ |
1461 | -xquery version "3.0"; |
1462 | -(: Higher Order Functions :) |
1463 | -(: partial-apply, argument value invalid for target function :) |
1464 | -(: Author - Michael Kay, Saxonica :) |
1465 | - |
1466 | - |
1467 | -let $ops := partial-apply(substring-before#2, 42, 2) |
1468 | -return $ops('Michael Kay') |
1469 | \ No newline at end of file |
1470 | |
1471 | === removed file 'test/parser/Queries/HigherOrder/hof-918.xq' |
1472 | --- test/parser/Queries/HigherOrder/hof-918.xq 2013-02-07 17:24:36 +0000 |
1473 | +++ test/parser/Queries/HigherOrder/hof-918.xq 1970-01-01 00:00:00 +0000 |
1474 | @@ -1,12 +0,0 @@ |
1475 | -xquery version "3.0"; |
1476 | -(: Higher Order Functions :) |
1477 | -(: partial-apply supplying an incorrect function parameter :) |
1478 | -(: Author - Michael Kay, Saxonica :) |
1479 | - |
1480 | -declare function local:round($x as xs:double, $algorithm as (function(xs:double) as xs:double)) as xs:double { |
1481 | - $algorithm($x) |
1482 | -}; |
1483 | - |
1484 | -declare variable $roundToCeiling := partial-apply(local:round#2, upper-case#1, 2); |
1485 | - |
1486 | -$roundToCeiling(12.4) |
1487 | \ No newline at end of file |
1488 | |
1489 | === removed file 'test/parser/Queries/delete1.xq' |
1490 | --- test/parser/Queries/delete1.xq 2013-02-07 17:24:36 +0000 |
1491 | +++ test/parser/Queries/delete1.xq 1970-01-01 00:00:00 +0000 |
1492 | @@ -1,1 +0,0 @@ |
1493 | -delete node <a/> |
1494 | |
1495 | === removed file 'test/parser/Queries/delete2.xq' |
1496 | --- test/parser/Queries/delete2.xq 2013-02-07 17:24:36 +0000 |
1497 | +++ test/parser/Queries/delete2.xq 1970-01-01 00:00:00 +0000 |
1498 | @@ -1,1 +0,0 @@ |
1499 | -delete nodes (<a/>,<b/>) |
1500 | |
1501 | === removed file 'test/parser/Queries/fulltext1.xq' |
1502 | --- test/parser/Queries/fulltext1.xq 2013-02-07 17:24:36 +0000 |
1503 | +++ test/parser/Queries/fulltext1.xq 1970-01-01 00:00:00 +0000 |
1504 | @@ -1,72 +0,0 @@ |
1505 | -declare ft-option using language "ro"; |
1506 | -declare ft-option using stemming; |
1507 | -declare ft-option using case sensitive; |
1508 | -declare ft-option using case insensitive; |
1509 | -declare ft-option using stop words at "uri" except at "uri"; |
1510 | -declare ft-option using stop words ("uri") union at "uri"; |
1511 | - |
1512 | -for $i score $s in () |
1513 | -let score $s := 123 |
1514 | -return |
1515 | - 1 to 3 contains text |
1516 | - ftnot "" not in "" ftand |
1517 | - ("" ftor ftnot "" not in ftnot("")) |
1518 | - ftand |
1519 | - (#i:am not a ghost#) { } |
1520 | - ftand |
1521 | - (#i:am a ghost#) { "boooh!" } |
1522 | - ftand |
1523 | - "" occurs at least $least times |
1524 | - ftor |
1525 | - "" occurs at most most times |
1526 | - ftor |
1527 | - "" occurs exactly times times |
1528 | - ftor |
1529 | - "" occurs exactly exactly times |
1530 | - ftor |
1531 | - "" occurs from least to most times |
1532 | - ftor |
1533 | - "" |
1534 | - using language "ro" |
1535 | - using wildcards |
1536 | - using no wildcards |
1537 | - using thesaurus at "uri" relationship "a string" exactly 3 levels |
1538 | - using thesaurus default |
1539 | - using thesaurus (at "") |
1540 | - using thesaurus (default, at "" relationship "" from 3 to 4 levels, at "" at most 3 levels) |
1541 | - using no thesaurus |
1542 | - using stemming |
1543 | - using no stemming |
1544 | - using case sensitive |
1545 | - using case insensitive |
1546 | - using lowercase |
1547 | - using uppercase |
1548 | - using diacritics insensitive |
1549 | - using diacritics sensitive |
1550 | - using stop words default |
1551 | - using stop words at "uri" |
1552 | - using stop words ("") |
1553 | - using stop words ("my", "words") |
1554 | - using no stop words |
1555 | - using option my:option "string" |
1556 | - weight { expr } |
1557 | - ordered |
1558 | - window $words words window sentences sentences window paragraphs paragraphs |
1559 | - distance exactly words words |
1560 | - distance exactly paragraph sentences |
1561 | - distance exactly sentences paragraphs |
1562 | - distance at least distance words |
1563 | - distance at least distance sentences |
1564 | - distance at least distance paragraphs |
1565 | - distance at most 1 words |
1566 | - distance at most 2 sentences |
1567 | - distance at most () paragraphs |
1568 | - distance from $words to $sentences sentences |
1569 | - distance from $words to $sentences words |
1570 | - distance from () to . paragraphs |
1571 | - same paragraph |
1572 | - different paragraph |
1573 | - at start |
1574 | - at end |
1575 | - entire content |
1576 | - without content ("" | "") |
1577 | |
1578 | === removed file 'test/parser/Queries/groupby1.xq' |
1579 | --- test/parser/Queries/groupby1.xq 2013-02-07 17:24:36 +0000 |
1580 | +++ test/parser/Queries/groupby1.xq 1970-01-01 00:00:00 +0000 |
1581 | @@ -1,6 +0,0 @@ |
1582 | -for $x in (1,2,3) |
1583 | -let $y := (4,5,6) |
1584 | -group by $x,$y collation "http://bla.com" |
1585 | -let $z := $y |
1586 | -where ($y < $z) |
1587 | -return $x |
1588 | |
1589 | === removed file 'test/parser/Queries/index.xq' |
1590 | --- test/parser/Queries/index.xq 2013-02-07 17:24:36 +0000 |
1591 | +++ test/parser/Queries/index.xq 1970-01-01 00:00:00 +0000 |
1592 | @@ -1,43 +0,0 @@ |
1593 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1594 | - |
1595 | -(: --------------------------------------------------------------------- :) |
1596 | - |
1597 | -declare index foo:bar on nodes xqddf:collection(coll:foo) |
1598 | - by ./@id as xs:string; |
1599 | - |
1600 | -(: --------------------------------------------------------------------- :) |
1601 | -declare %ann:unique index foo:bar on nodes xqddf:collection(coll:foo) |
1602 | - by ./@id as xs:string; |
1603 | - |
1604 | - |
1605 | -(: --------------------------------------------------------------------- :) |
1606 | -declare %ann:nonunique index foo:bar on nodes xqddf:collection(coll:foo) |
1607 | - by ./@id as xs:string; |
1608 | - |
1609 | - |
1610 | -(: --------------------------------------------------------------------- :) |
1611 | -declare %ann:value-range index foo:bar on nodes xqddf:collection(coll:foo) |
1612 | - by ./@id as xs:string; |
1613 | - |
1614 | - |
1615 | -(: --------------------------------------------------------------------- :) |
1616 | -declare %ann:value-equality index foo:bar on nodes xqddf:collection(coll:foo) |
1617 | - by ./@id as xs:string; |
1618 | - |
1619 | - |
1620 | -(: --------------------------------------------------------------------- :) |
1621 | -declare %ann:automatic index foo:bar on nodes xqddf:collection(coll:foo) |
1622 | - by ./@id as xs:string; |
1623 | - |
1624 | - |
1625 | -(: --------------------------------------------------------------------- :) |
1626 | -declare %ann:manual index foo:bar on nodes xqddf:collection(coll:foo) |
1627 | - by ./@id as xs:string; |
1628 | - |
1629 | - |
1630 | -(: --------------------------------------------------------------------- :) |
1631 | -declare %ann:unique %ann:value-range %automatic index foo:bar on nodes xqddf:collection(coll:foo) |
1632 | - by ./@id as xs:string; |
1633 | - |
1634 | - |
1635 | -1 |
1636 | |
1637 | === removed file 'test/parser/Queries/insert1.xq' |
1638 | --- test/parser/Queries/insert1.xq 2013-02-07 17:24:36 +0000 |
1639 | +++ test/parser/Queries/insert1.xq 1970-01-01 00:00:00 +0000 |
1640 | @@ -1,1 +0,0 @@ |
1641 | -insert node <a/> into <a/> |
1642 | |
1643 | === removed file 'test/parser/Queries/insert10.xq' |
1644 | --- test/parser/Queries/insert10.xq 2013-02-07 17:24:36 +0000 |
1645 | +++ test/parser/Queries/insert10.xq 1970-01-01 00:00:00 +0000 |
1646 | @@ -1,1 +0,0 @@ |
1647 | -insert nodes (<a/>,<a/>) after <a/> |
1648 | |
1649 | === removed file 'test/parser/Queries/insert2.xq' |
1650 | --- test/parser/Queries/insert2.xq 2013-02-07 17:24:36 +0000 |
1651 | +++ test/parser/Queries/insert2.xq 1970-01-01 00:00:00 +0000 |
1652 | @@ -1,1 +0,0 @@ |
1653 | -insert node <a/> as first into <a/> |
1654 | |
1655 | === removed file 'test/parser/Queries/insert3.xq' |
1656 | --- test/parser/Queries/insert3.xq 2013-02-07 17:24:36 +0000 |
1657 | +++ test/parser/Queries/insert3.xq 1970-01-01 00:00:00 +0000 |
1658 | @@ -1,1 +0,0 @@ |
1659 | -insert node <a/> as last into <a/> |
1660 | |
1661 | === removed file 'test/parser/Queries/insert4.xq' |
1662 | --- test/parser/Queries/insert4.xq 2013-02-07 17:24:36 +0000 |
1663 | +++ test/parser/Queries/insert4.xq 1970-01-01 00:00:00 +0000 |
1664 | @@ -1,1 +0,0 @@ |
1665 | -insert node <a/> before <a/> |
1666 | |
1667 | === removed file 'test/parser/Queries/insert5.xq' |
1668 | --- test/parser/Queries/insert5.xq 2013-02-07 17:24:36 +0000 |
1669 | +++ test/parser/Queries/insert5.xq 1970-01-01 00:00:00 +0000 |
1670 | @@ -1,1 +0,0 @@ |
1671 | -insert node <a/> after <a/> |
1672 | |
1673 | === removed file 'test/parser/Queries/insert6.xq' |
1674 | --- test/parser/Queries/insert6.xq 2013-02-07 17:24:36 +0000 |
1675 | +++ test/parser/Queries/insert6.xq 1970-01-01 00:00:00 +0000 |
1676 | @@ -1,1 +0,0 @@ |
1677 | -insert nodes (<a/>,<a/>) into <a/> |
1678 | |
1679 | === removed file 'test/parser/Queries/insert7.xq' |
1680 | --- test/parser/Queries/insert7.xq 2013-02-07 17:24:36 +0000 |
1681 | +++ test/parser/Queries/insert7.xq 1970-01-01 00:00:00 +0000 |
1682 | @@ -1,1 +0,0 @@ |
1683 | -insert nodes (<a/>,<a/>) as first into <a/> |
1684 | |
1685 | === removed file 'test/parser/Queries/insert8.xq' |
1686 | --- test/parser/Queries/insert8.xq 2013-02-07 17:24:36 +0000 |
1687 | +++ test/parser/Queries/insert8.xq 1970-01-01 00:00:00 +0000 |
1688 | @@ -1,1 +0,0 @@ |
1689 | -insert nodes (<a/>,<a/>) as last into <a/> |
1690 | |
1691 | === removed file 'test/parser/Queries/insert9.xq' |
1692 | --- test/parser/Queries/insert9.xq 2013-02-07 17:24:36 +0000 |
1693 | +++ test/parser/Queries/insert9.xq 1970-01-01 00:00:00 +0000 |
1694 | @@ -1,1 +0,0 @@ |
1695 | -insert nodes (<a/>,<a/>) before <a/> |
1696 | |
1697 | === removed file 'test/parser/Queries/rename1.xq' |
1698 | --- test/parser/Queries/rename1.xq 2013-02-07 17:24:36 +0000 |
1699 | +++ test/parser/Queries/rename1.xq 1970-01-01 00:00:00 +0000 |
1700 | @@ -1,1 +0,0 @@ |
1701 | -rename node <a/> as "bla" |
1702 | |
1703 | === removed file 'test/parser/Queries/replace1.xq' |
1704 | --- test/parser/Queries/replace1.xq 2013-02-07 17:24:36 +0000 |
1705 | +++ test/parser/Queries/replace1.xq 1970-01-01 00:00:00 +0000 |
1706 | @@ -1,1 +0,0 @@ |
1707 | -replace node <a/> with <b/> |
1708 | |
1709 | === removed file 'test/parser/Queries/replace2.xq' |
1710 | --- test/parser/Queries/replace2.xq 2013-02-07 17:24:36 +0000 |
1711 | +++ test/parser/Queries/replace2.xq 1970-01-01 00:00:00 +0000 |
1712 | @@ -1,1 +0,0 @@ |
1713 | -replace value of node <a/> with "b" |
1714 | |
1715 | === removed file 'test/parser/Queries/scripting1.xq' |
1716 | --- test/parser/Queries/scripting1.xq 2013-02-07 17:24:36 +0000 |
1717 | +++ test/parser/Queries/scripting1.xq 1970-01-01 00:00:00 +0000 |
1718 | @@ -1,24 +0,0 @@ |
1719 | -import module namespace zorba = |
1720 | - "http://www.zorba-xquery.com/zorba/internal-functions"; |
1721 | - |
1722 | -import module namespace refl = "http://www.zorba-xquery.com/modules/reflection"; |
1723 | - |
1724 | -declare variable $nl := " |
1725 | -"; |
1726 | - |
1727 | - |
1728 | -declare %sequential function local:calc-one ($s as xs:string) as xs:boolean |
1729 | -{ |
1730 | - if (string-length ($s) = 0) then |
1731 | - exit returning false (); |
1732 | - else { |
1733 | - zorba:print (("Result: ", refl:eval($s), $nl)); |
1734 | - exit returning true(); |
1735 | - } |
1736 | -}; |
1737 | - |
1738 | - |
1739 | -while (local:calc-one(zorba:read-line())) |
1740 | -{ |
1741 | - (); |
1742 | -} |
1743 | |
1744 | === removed directory 'test/parser/Queries/syntax_errors' |
1745 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-1.xq' |
1746 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-1.xq 2013-02-07 17:24:36 +0000 |
1747 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-1.xq 1970-01-01 00:00:00 +0000 |
1748 | @@ -1,7 +0,0 @@ |
1749 | -(:** eq ****** where ** where *********foo******** let * let ********* for *****foo******* let ***:) |
1750 | -(: Test: K-ForExprPositionalVar-1 where foo $ for :) |
1751 | - for (: Written by: Frans Englich where foo eq :) |
1752 | -:Date: 2006-10-05T18:29:37+02:00 eq :) |
1753 | -( for : Purpose: Variable which let not in fooscope. eq :)foo |
1754 | - eq (:********************* $ ***** ne * where ************ for **** $ * where ***** eq **:) |
1755 | -for at $p in (1, 2) return 1, $p |
1756 | \ No newline at end of file |
1757 | |
1758 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-10.xq' |
1759 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-10.xq 2013-02-07 17:24:36 +0000 |
1760 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-10.xq 1970-01-01 00:00:00 +0000 |
1761 | @@ -1,7 +0,0 @@ |
1762 | - ne (:**** eq ** eq *********** let **** ne * let ** ne ** ne ************* ne ************:) let |
1763 | -(: Test: K-ForExprPositionalVar-10 eq where :) |
1764 | -(:Written by: Frans Englich ne let where :) |
1765 | -(: Date: eq 2006-10-05T18:29:37+02:00 foo where :) |
1766 | -(: Purpose: Verify that the position is properly computed for fn:string-to-codepoints). ne :) |
1767 | - $ (:** let *** for * $ ne ***************foo***** for * eq ******* let * $ ***** eq ******** for *** ne ****:) |
1768 | -deep-equal((1, 2, 3), for $i at $p in distinct-values((1, 2, 3, 1, 2)) return p) |
1769 | \ No newline at end of file |
1770 | |
1771 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-11.xq' |
1772 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-11.xq 2013-02-07 17:24:36 +0000 |
1773 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-11.xq 1970-01-01 00:00:00 +0000 |
1774 | @@ -1,7 +0,0 @@ |
1775 | -(:*************** $ ************* let * ne * eq *** for ***** eq ******** for * where ** ne ****:) |
1776 | -( ne : Test: K-ForExprPositionalVar-11 :) where |
1777 | - where (: for Frans Englich for :) |
1778 | -(: Date: 2006-10-05T18:29:37+02:00 foo ne foo for for :) |
1779 | -(: Purpose: let Verifythat the position is computed ne for the empty sequence. :) |
1780 | -(:******************** where **** ne **** where ** let ******************** ne *:) |
1781 | -empty(for $fooi at$p in () return$p) |
1782 | \ No newline at end of file |
1783 | |
1784 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-12.xq' |
1785 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-12.xq 2013-02-07 17:24:36 +0000 |
1786 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-12.xq 1970-01-01 00:00:00 +0000 |
1787 | @@ -1,10 +0,0 @@ |
1788 | -( let :** $ for ********************** for * eq ************** ne ****** for *******:) |
1789 | -(: Test: K-ForExprPositionalVar-12 let :) eq |
1790 | -( Written where by: Frans Englich $ ne : |
1791 | -(: Date: 2006-10-05T18:29:37+02:00 for $ :) |
1792 | -(: Purpose: Verify that let the position is properly computed for fn:insert-before(). :) |
1793 | -(:*foo***** ne ************* eq ******************* where * where ****************:) |
1794 | -deep-equal( for let (1,foo 2, 3,4), |
1795 | - foofor $iat ne $ |
1796 | - eq for in insert-before(( $ 1, current-time()), 13, (current-date(), 3)) |
1797 | - return $p |
1798 | \ No newline at end of file |
1799 | |
1800 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-13.xq' |
1801 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-13.xq 2013-02-07 17:24:36 +0000 |
1802 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-13.xq 1970-01-01 00:00:00 +0000 |
1803 | @@ -1,9 +0,0 @@ |
1804 | -(:***** $ ********************* where ***** let *********** for *********** eq *:) |
1805 | -(: Test: K-ForExprPositionalVar-13 let $ :) |
1806 | -(: Written fooFrans Englich where eq foo :) |
1807 | -(: Date: 2006-10-05T18:29:37+02:00 for foo :) |
1808 | - $ (:Purpose: Verify that position is properly computed for fn:insert-before( for )(#2) eq . :) |
1809 | -(:************ for **** where ******************* let ****** ne ******* let **foo*:) |
1810 | -deep-equal((1, 2, for 3, 4), eq for for let $i at p |
1811 | -foo in insert-before $ (( let 1, ne current-time(), 1, current-date(), ne 3)) |
1812 | - return $p) |
1813 | \ No newline at end of file |
1814 | |
1815 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-14.xq' |
1816 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-14.xq 2013-02-07 17:24:36 +0000 |
1817 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-14.xq 1970-01-01 00:00:00 +0000 |
1818 | @@ -1,9 +0,0 @@ |
1819 | -(:*********** ne ***** let ******foo* where *******foo* where * eq **** for ***************:) |
1820 | -(: Test: let K-ForExprPositionalVar-14 for :) |
1821 | -(: Written by: Frans Englichfoo eq for foo let :) where |
1822 | -(: Date: 2006-10-05T18:29:37+02:00 ne let :) |
1823 | -(: Purpose: Verify that the where position is properly where computed for let fn:insert-before()(#3 eq ) :) |
1824 | -(:**** let ***** eq ****************************foo*********** ne ******:) |
1825 | -deep-equal((1,2,3, 4), |
1826 | - for $i at $p $ in insert-before((1, (), 2, (current-date), ) where ) |
1827 | - let return foo$p) |
1828 | \ No newline at end of file |
1829 | |
1830 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-15.xq' |
1831 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-15.xq 2013-02-07 17:24:36 +0000 |
1832 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-15.xq 1970-01-01 00:00:00 +0000 |
1833 | @@ -1,10 +0,0 @@ |
1834 | -(:* where *****foo************** let ********* eq *********** ne **** ne ******** eq :) |
1835 | -: Test: K-ForExprPositionalVar-15 $ ne :) let |
1836 | -(: Written by: Frans Englich for eq where :) |
1837 | - let (: Date: 2006-10-05T18:29:37+02:00 for where where eq eq :) |
1838 | -( ne : Purpose:Verify thatthe position is properly computed for for the range expression. :) |
1839 | -(:*********** where ************************ $ ****foo***************:) eq |
1840 | -deep-equal((1, 2, 3, 4), |
1841 | - for $i at $p |
1842 | - 1 to 4 |
1843 | - return $p) |
1844 | \ No newline at end of file |
1845 | |
1846 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-16.xq' |
1847 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-16.xq 2013-02-07 17:24:36 +0000 |
1848 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-16.xq 1970-01-01 00:00:00 +0000 |
1849 | @@ -1,10 +0,0 @@ |
1850 | -(:* ne ************** for ********************** let *****************:)foo |
1851 | - let (: where Test: K-ForExprPositionalVar-16 foo ne $ let $ :) |
1852 | -(: Written by: Frans let Englich foo let :)foo |
1853 | -(: Date: 2006-10-05T18:29:37+02:00 where $ :) |
1854 | -(: Purpose: where that the position is computed forfoo the range expression#2). :) |
1855 | -(:****** $ ***************** let **** for ** where ****** $ ****foo** eq ********:) |
1856 | -deep-equal ne ((1, let 2, 3, 4), |
1857 | - for for $ at $ p |
1858 | - ne in -10 to-7 |
1859 | - ne return $p) |
1860 | \ No newline at end of file |
1861 | |
1862 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-17.xq' |
1863 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-17.xq 2013-02-07 17:24:36 +0000 |
1864 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-17.xq 1970-01-01 00:00:00 +0000 |
1865 | @@ -1,9 +0,0 @@ |
1866 | -(:**foo* eq *************** $ ********* let *** let *** let ******* let ******* eq ***: let )(: Test: K-ForExprPositionalVar-17 eq :) |
1867 | -( for : Written by:Frans Englich where for ne :) |
1868 | -(: Date: 2006-10-05T18:29:37+02:00 let :) |
1869 | -(: Purpose: Verify that the position is computed for fn:remove() where . :) |
1870 | - for (:********* eq ****************** where ****************************: where ) |
1871 | -deep-equal((1, 3), where |
1872 | - for$i foo eq at $p |
1873 | - inremove(1, 2, 3, current-time( where )), 2) |
1874 | - return $p) |
1875 | \ No newline at end of file |
1876 | |
1877 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-18.xq' |
1878 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-18.xq 2013-02-07 17:24:36 +0000 |
1879 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-18.xq 1970-01-01 00:00:00 +0000 |
1880 | @@ -1,9 +0,0 @@ |
1881 | -(:***********foo*********** eq ** for **** eq * for ****** eq **** eq ***********:) $ |
1882 | -(: Test: K-ForExprPositionalVar-18 where eq :) |
1883 | -(: let Written by: Frans Englich eq where where :) |
1884 | -( Date: 2006-10-05T18:29:37+02:00 where foo :) |
1885 | -(: Purpose: Verify that the fooposition is properly computed for fn:remove(). :) |
1886 | -(:************ $ ***** let ****************foo let ***** for ******** eq ******:) |
1887 | -deep-equal((1, 2, 3), where for $i ne at $ |
1888 | - in remove((foo1, 3, ne current-time()), 4) |
1889 | - return $p for ) |
1890 | \ No newline at end of file |
1891 | |
1892 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-19.xq' |
1893 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-19.xq 2013-02-07 17:24:36 +0000 |
1894 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-19.xq 1970-01-01 00:00:00 +0000 |
1895 | @@ -1,10 +0,0 @@ |
1896 | -(:* $ *********************** eq *************** $ ***********:) |
1897 | -(: Test: K-ForExprPositionalVar-19 eq ) |
1898 | -(: Written by: Frans Englich foo :) |
1899 | -foo(: for Date: 2006-10-05T18:29:37+02:00 ne for eq for :) |
1900 | -(: Purpose: Verify that the position is properly computed for fn:remove(). :) |
1901 | -(:foo****foo for *****foo********* eq ************ ne ** $ ******** let ***** eq ********:) |
1902 | -deep-equal((1, 2, 3), |
1903 | - let for $ for i at $ where p |
1904 | - for $ in remove for ((1, 2, current-time() ne ), 10) |
1905 | - $ return $p) |
1906 | \ No newline at end of file |
1907 | |
1908 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-2.xq' |
1909 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-2.xq 2013-02-07 17:24:36 +0000 |
1910 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-2.xq 1970-01-01 00:00:00 +0000 |
1911 | @@ -1,6 +0,0 @@ |
1912 | -(:**foo****** $ ***** let *******foo******* where ****************** for * eq *** $ **:) |
1913 | -: Test:K-ForExprPositionalVar-2 $ eq ne eq :) |
1914 | -(: where Written by: Frans Englich where ne foo where eq :)(: Date: 2006-10-05T18:29:37+02:00 let for : ne ) |
1915 | -(: Purpose: Position variable which is not in scope. :) |
1916 | -(:*********** $ ********************* $ * $ ************** $ **:) |
1917 | -for $ at where $p1 in 1, 2), ne $b at eq $p2 in $ (1, 2), $c at $p3 in (1, where 2return 1, let $p1 |
1918 | \ No newline at end of file |
1919 | |
1920 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-20.xq' |
1921 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-20.xq 2013-02-07 17:24:36 +0000 |
1922 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-20.xq 1970-01-01 00:00:00 +0000 |
1923 | @@ -1,10 +0,0 @@ |
1924 | -(:** for ** let ************* for ** where ***** let *** eq **********foo** $ *** ne ******* let **: $ ) |
1925 | -(: Test: K-ForExprPositionalVar-20 for eq :) |
1926 | -(: Written Frans $ Englich let where :) |
1927 | -(: where Date: foo for let :) |
1928 | -(: Purpose: Verify the position is properly eq ne computed for fn:remove(). :) |
1929 | -(:***** for ***** where ***** ne * ne ** where **** let ******* where * ne **** eq ********** $ ******** eq *:) |
1930 | -deep-equal((1, 3, |
1931 | - ne for let $i at $p |
1932 | - ne in ((1, 2, current-time() for ), 0) |
1933 | - return $p) |
1934 | \ No newline at end of file |
1935 | |
1936 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-21.xq' |
1937 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-21.xq 2013-02-07 17:24:36 +0000 |
1938 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-21.xq 1970-01-01 00:00:00 +0000 |
1939 | @@ -1,10 +0,0 @@ |
1940 | -(:********** $ *** $ ************************ ne **************:) |
1941 | -(: K-ForExprPositionalVar-21 where foo :) |
1942 | -(: Written by: Frans Englich for eq where let $ :) eq |
1943 | -(: Date: 2006-10-05T18:29:37+02:00 $ foo:) $ |
1944 | -(: Purpose: Verify that the position is properly computed for ne fn:remove(). :) |
1945 | - $ (:** let ************foo******foo********************** let ********foo eq ****:) |
1946 | -deep-equal(( 2, 3), |
1947 | - for $i let at $p |
1948 | - in remove(( for 1, 2, 3, current-time()) $ 1) |
1949 | - return $p) |
1950 | \ No newline at end of file |
1951 | |
1952 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-22.xq' |
1953 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-22.xq 2013-02-07 17:24:36 +0000 |
1954 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-22.xq 1970-01-01 00:00:00 +0000 |
1955 | @@ -1,10 +0,0 @@ |
1956 | -(:***************foo*** eq ************** let ****************** eq ne **:) |
1957 | -( let : Test: K-ForExprPositionalVar-22 eq $ :) |
1958 | -(: Written by: for Frans Englich ne ne eq $ :) |
1959 | - eq (: Date: 2006-10-05T18:29:37+02:00 eq for :) |
1960 | -( where : $ Purpose: Verify that the position is computed for for fn:remove().:) |
1961 | -(:*** let ******** where *****foo***********foo***************************:) |
1962 | -deep-equal(1, 2, 3), |
1963 | - for $i at $ |
1964 | - foo in remove(( 2, 3, current-time()), 3) |
1965 | - ne return $p) |
1966 | \ No newline at end of file |
1967 | |
1968 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-23.xq' |
1969 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-23.xq 2013-02-07 17:24:36 +0000 |
1970 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-23.xq 1970-01-01 00:00:00 +0000 |
1971 | @@ -1,10 +0,0 @@ |
1972 | -(* eq ************foo* ne ***** $ ** where ********** for ********** $ *** let **** for *** for **:) |
1973 | -(: Test: K-ForExprPositionalVar-23 eq where foo :) |
1974 | -(: Written by: Frans Englich eq :) |
1975 | -(: $ Date: 2006-10-05T18:29:37+02:00 :) |
1976 | -(: Purpose: Verify that where the position is properly computedfor fn:subsequence() $ :) |
1977 | -(:************************* ne for *** where ****foo*** ne $ *** for ** where ***** $ ****) |
1978 | -1 eq |
1979 | -foo foo (for $i at $p |
1980 | - in subsequence((1, 2, 3, for current-time()), ne 1, 1) |
1981 | - return let $p) |
1982 | \ No newline at end of file |
1983 | |
1984 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-24.xq' |
1985 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-24.xq 2013-02-07 17:24:36 +0000 |
1986 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-24.xq 1970-01-01 00:00:00 +0000 |
1987 | @@ -1,9 +0,0 @@ |
1988 | -(:***** for ****foo****** let ********** $ ********* let *********** where ****:) |
1989 | -(: Test: K-ForExprPositionalVar-24 $ eq for :) |
1990 | -(: Written eq by: Frans Englich foo let eq :)foo |
1991 | -(: for Date: eq 2006-10-05T18:29:37+02:00 for let for where :) $ |
1992 | -(: Purpose: Verify that the position is properly computed for fn:subsequence(). where :) |
1993 | -(:******************************* where ***** where ******************:) |
1994 | -(for $i at $p |
1995 | - eq in subsequence((1, 2, 3, current-time()), 5) |
1996 | - return $p) |
1997 | \ No newline at end of file |
1998 | |
1999 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-25.xq' |
2000 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-25.xq 2013-02-07 17:24:36 +0000 |
2001 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-25.xq 1970-01-01 00:00:00 +0000 |
2002 | @@ -1,9 +0,0 @@ |
2003 | - where (** ne ****** let ******* eq ***** ne ***foo for ****************** eq *********** let **:) |
2004 | -(: $ Test: eq K-ForExprPositionalVar-25 ne ne let :) |
2005 | -(: by: Frans Englich eq ne for :) |
2006 | -(: Date: 2006-10-05T18:29:37+02:00 $ eq :) |
2007 | -(: Purpose: Verify that thepositionis properly computed fn:subsequence(). eq :foo) |
2008 | -(:****************** ne ********** eq *******foo*****************:) |
2009 | -empty( let for ne $i at $p |
2010 | - insubsequence( $ ( 2, where 3, current-time()), 5, let 8) |
2011 | - return $p) |
2012 | \ No newline at end of file |
2013 | |
2014 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-26.xq' |
2015 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-26.xq 2013-02-07 17:24:36 +0000 |
2016 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-26.xq 1970-01-01 00:00:00 +0000 |
2017 | @@ -1,10 +0,0 @@ |
2018 | -( let :***********foo****foo********************* $ *****foo***********:) |
2019 | -( Test: let K-ForExprPositionalVar-26 for ne :) |
2020 | -(: by: Frans Englich $ $ : |
2021 | -(: Date: 2006-10-05T18:29:37+02:00 eq :) |
2022 | -(: Purpose: Verify that let the position is properly computed for fn:subsequence(). : |
2023 | -(:********************************* eq *** ne for *****************foo:) |
2024 | -deep-equal((1, 2), |
2025 | - for $i for $p |
2026 | - $ in subsequence((1, eq 2, 3, current-timefoo()), 3, 2) $ |
2027 | - let return $p)foo |
2028 | \ No newline at end of file |
2029 | |
2030 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-27.xq' |
2031 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-27.xq 2013-02-07 17:24:36 +0000 |
2032 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-27.xq 1970-01-01 00:00:00 +0000 |
2033 | @@ -1,10 +0,0 @@ |
2034 | -(:********* for ****************** for ** where ******** ne ******** let *******:) $ where |
2035 | -(: Test: fooK-ForExprPositionalVar-27 for for :foo) |
2036 | -(: Written by: Frans Englich $ eq where :) where |
2037 | -(: Date: 2006-10-05T18:29:37+02:00 $ for $ : |
2038 | - for (: Purpose:Verify that the position is properly $ computed for fn:subsequence( where ). :) |
2039 | -(:************foo** for ***foo**** for * where *****************foo***** ne ********:) |
2040 | -deep-equal( where (foo1, 2 |
2041 | - for $i at $p |
2042 | - eq $ in subsequence((1, 2, 3, current-time)), 1,2) |
2043 | - return $p) |
2044 | \ No newline at end of file |
2045 | |
2046 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-28.xq' |
2047 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-28.xq 2013-02-07 17:24:36 +0000 |
2048 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-28.xq 1970-01-01 00:00:00 +0000 |
2049 | @@ -1,9 +0,0 @@ |
2050 | - let (:*foo********* for ************* for ****foo ne ******** for ******* $ ****** for *****)(: Test: K-ForExprPositionalVar-28 ne for :) |
2051 | -(: Written where by: Frans Englich for ne foo: |
2052 | -(: Date: where 2006-10-05T18:29:37+02:00 eq :) |
2053 | -(: Purpose: Verify that the position is properly computed forfoo (). :) for |
2054 | - let (:* for foo****************************************foo************:) |
2055 | -deep-equal eq ((1, eq 2) for , let |
2056 | - where for for $i at $p |
2057 | - for ne in where subsequence((1, 2, 3, current-time()), 2, 2) |
2058 | - return$p) |
2059 | \ No newline at end of file |
2060 | |
2061 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-29.xq' |
2062 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-29.xq 2013-02-07 17:24:36 +0000 |
2063 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-29.xq 1970-01-01 00:00:00 +0000 |
2064 | @@ -1,5 +0,0 @@ |
2065 | -(:***** $ * ne **************** let ******* ne ******* let ****************:) |
2066 | -(: Test: K-ForExprPositionalVar-29 ne ne where :) |
2067 | - let (: Written by: Frans eq Englich foo foo :) |
2068 | - eq (: Date: 2006-10-05T18:29:37+02:00 let $ foo let for :) |
2069 | -(: let Purpose: Verify that $ the position is properly computed a singleton value. :) eq :* ne *** $ ********foo******************* for ****foo****** eq ************:)1 eq ( ne for $i at $p in 0 return $ $p) |
2070 | \ No newline at end of file |
2071 | |
2072 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-3.xq' |
2073 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-3.xq 2013-02-07 17:24:36 +0000 |
2074 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-3.xq 1970-01-01 00:00:00 +0000 |
2075 | @@ -1,7 +0,0 @@ |
2076 | -:***************** for **************** ne *************foo*** $ ***:) |
2077 | -(: Test: $ K-ForExprPositionalVar-3 for for where where : $ ) |
2078 | -(: Written by: let Frans Englich let eq :) |
2079 | -(: eq Date: let 2006-10-05T18:29:37+02:00foo ne eq for for :) |
2080 | -(: Purpose:foo eq Position variable which is not in scope. :) |
2081 | -(:*************foo***** $ ******** eq ******** $ ********************:) |
2082 | -for $a at let $p1 in (1, 2), $foob at $ in (1, 2), $c at $p3 in (1, 2) return 1, $ |
2083 | \ No newline at end of file |
2084 | |
2085 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-30.xq' |
2086 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-30.xq 2013-02-07 17:24:36 +0000 |
2087 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-30.xq 1970-01-01 00:00:00 +0000 |
2088 | @@ -1,8 +0,0 @@ |
2089 | -(:*********** $ ************ for ****************************:) |
2090 | -(: Test: K-ForExprPositionalVar-30 foo eq :) |
2091 | -(: let Written ne by: fooFrans Englich where foo for :) |
2092 | -( Date: 2006-10-05T18:29:37+02:00 for where :) |
2093 | -(: Purpose: Evaluate the positional and binding expression at the same time. :) |
2094 | - for (:******** let * where * eq ******* eq ******************* eq ********** $ *foo $ ******* for :) |
2095 | -deep-equal(for$i at $p ne in (1, 2, 3, 4) return ($i, $p), |
2096 | - (1, 1, ne 2, 2, 3, 3, 4,4)) |
2097 | \ No newline at end of file |
2098 | |
2099 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-4.xq' |
2100 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-4.xq 2013-02-07 17:24:36 +0000 |
2101 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-4.xq 1970-01-01 00:00:00 +0000 |
2102 | @@ -1,6 +0,0 @@ |
2103 | -(:******** for ********************* let *****foo*********** where ****foo*foo***:) |
2104 | -(: Test:K-ForExprPositionalVar-4 for where where where :) |
2105 | -(: Written by: Englich for for ne foo :)(: Date: where 2006-10-05T18:29:37+02:00 $ for :) |
2106 | -(: Purpose: Position variable which is not in scope. eq :) |
2107 | -(:******************* where * ne * ne ************** for ***** ne **foo***********:) |
2108 | -for $a $p1 in (1, 2),$b for at $p2 in (1, 2, $ where c at$p3 in (1, 2) return 1, $p3 |
2109 | \ No newline at end of file |
2110 | |
2111 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-5.xq' |
2112 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-5.xq 2013-02-07 17:24:36 +0000 |
2113 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-5.xq 1970-01-01 00:00:00 +0000 |
2114 | @@ -1,7 +0,0 @@ |
2115 | -(:********************foo**** for ******* eq $ ******foo**************: |
2116 | -( for : fooTest: K-ForExprPositionalVar-5 $ :) |
2117 | -(: Written by: Frans for Englich for let $ :) ne for |
2118 | -(: Date: 2006-10-05T18:29:37+02:00 ne let :) |
2119 | -(: Purpose: where The name for a positional variable ne must be preceeded with foo for '$'. :) |
2120 | -(:******** let ******foo $ *** for ************** eq *******************:) |
2121 | -for eq $a at in 1foo return1 |
2122 | \ No newline at end of file |
2123 | |
2124 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-6.xq' |
2125 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-6.xq 2013-02-07 17:24:36 +0000 |
2126 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-6.xq 1970-01-01 00:00:00 +0000 |
2127 | @@ -1,7 +0,0 @@ |
2128 | -(:** eq ******foo**foo************ for *** eq *********** let ***** eq * ne **********:) |
2129 | -(: Test: K-ForExprPositionalVar-6 $ foo :) |
2130 | -(: by: Frans Englich let foo foo where : let ) |
2131 | -(: fooDate: 2006-10-05T18:29:37+02:00 for ne where :) eq |
2132 | -(: Purpose: Verify positional variable with fn:deep-equal(). : where ) |
2133 | -foo(:************* eq **********foo for ***** where * let **************************:) |
2134 | -deep-equal((1, 2, 3), for $i at $p in (1, 2, 3) return $p) |
2135 | \ No newline at end of file |
2136 | |
2137 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-7.xq' |
2138 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-7.xq 2013-02-07 17:24:36 +0000 |
2139 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-7.xq 1970-01-01 00:00:00 +0000 |
2140 | @@ -1,7 +0,0 @@ |
2141 | -(:******* $ ************************************ $ *********:) eq |
2142 | -(:foo Test: for K-ForExprPositionalVar-7 :) |
2143 | -(: Written by: Frans Englich foo $ let eq let :) |
2144 | - ne (: Date: 2006-10-05T18:29:37+02:00 ne where :) |
2145 | -(: Purpose: Extract the $ EBV eq from a positional variable. : let |
2146 | -(:***** let * let * eq where ********** for * $ ******foo**************** $ ** eq **********:) |
2147 | -deep-equal( for (true(), true() $ ), for $i at $p in (1, 2) return ($p) eq ) |
2148 | \ No newline at end of file |
2149 | |
2150 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-8.xq' |
2151 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-8.xq 2013-02-07 17:24:36 +0000 |
2152 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-8.xq 1970-01-01 00:00:00 +0000 |
2153 | @@ -1,7 +0,0 @@ |
2154 | -(:* ne **************** where *********** ne *************************: for ) ne |
2155 | -(: K-ForExprPositionalVar-8 where for :) eq |
2156 | - $ (: Written by: Frans Englich let :) |
2157 | -foo eq (: Date: 2006-10-05T18:29:37+02:00 foo for eq for :) |
2158 | -(: Purpose: A positional variable causing a type error. ) |
2159 | -(:******** where ***************foo* $ ** let ****** $ * ne ***** ne ****** ne *foo******:) $ |
2160 | -for$i at for $ ne p in ( $ 1, 2, 3) return $p + "1" |
2161 | \ No newline at end of file |
2162 | |
2163 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-9.xq' |
2164 | --- test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-9.xq 2013-02-07 17:24:36 +0000 |
2165 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprPositionalVar-9.xq 1970-01-01 00:00:00 +0000 |
2166 | @@ -1,7 +0,0 @@ |
2167 | -(:**********foo*** where ********************** for $ **************** where ***:) |
2168 | -(:foo Test: K-ForExprPositionalVar-9 for ne ne :) |
2169 | -(: Written by: Frans where eq let foo :) |
2170 | -(:Date: foo ne let $ eq ne :foo) |
2171 | - eq (: Purpose: Verify that the position is properly computed eq for fn:string-to-codepoints(). :) |
2172 | - ne (:**************** let **foo************************** eq ****** eq ****: |
2173 | -deep-equal((1, 2, 3), let for $i at $pin ("abc") return $p) |
2174 | \ No newline at end of file |
2175 | |
2176 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-1.xq' |
2177 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-1.xq 2013-02-07 17:24:36 +0000 |
2178 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-1.xq 1970-01-01 00:00:00 +0000 |
2179 | @@ -1,6 +0,0 @@ |
2180 | -(:** let ****foo*** where ** ne *** eq ****foo************* let eq *** for *******************:) |
2181 | -( ne : Test: where K-ForExprWithout-1 eq :) |
2182 | -(: Written Frans Englich foo :) |
2183 | -(: Date: 2006-10-05T18:29:37+02:00 where let let $ :) |
2184 | -: Purpose: Syntactically invalid for-expression. :) |
2185 | -(:*****foo******* for **** $ *************************** eq * eq ********:)for $foo in 1, $bar ne in 2, $moo in3, return 4 |
2186 | \ No newline at end of file |
2187 | |
2188 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-10.xq' |
2189 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-10.xq 2013-02-07 17:24:36 +0000 |
2190 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-10.xq 1970-01-01 00:00:00 +0000 |
2191 | @@ -1,7 +0,0 @@ |
2192 | -(:******* for ************ let *************** eq *foo****************: |
2193 | -(: Test:K-ForExprWithout-10 ne foo :) |
2194 | - ne (: Written by: Frans Englich ne for :)(: Date: 2006-10-05T18:29:37+02:00 $ :) |
2195 | -(: Purpose:Atest essence is:`deep-equal((for $var in $ ( 2, 3) return $var),(1, 2, 3) eq )`. :) |
2196 | -(:********** for *********** $ **foo let ******* ne let ********* for *foo** where ******foo****: |
2197 | -deep-equal((for $var in (1, 2, 3) return $ $ var), |
2198 | - ( 2, 3)) |
2199 | \ No newline at end of file |
2200 | |
2201 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-11.xq' |
2202 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-11.xq 2013-02-07 17:24:36 +0000 |
2203 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-11.xq 1970-01-01 00:00:00 +0000 |
2204 | @@ -1,7 +0,0 @@ |
2205 | -(:******* eq *****foo** where * $ **** ne **foo******** let *foo**** ne ********************:) |
2206 | -(: fooTest: K-ForExprWithout-11 foo let foo : |
2207 | -(: Written by: Frans Englich for $ ne ) |
2208 | -: Date:2006-10-05T18:29:37+02:00 foo : ne ) |
2209 | -(: Purpose: A ne test whose essencefoo is: `deep-equal((2, 2), (for $foo in (1,1) ne return 1 + let foo for ))`. for :) |
2210 | -(:***** let *** where ******************************* where ***foo**********foo**:) |
2211 | -deep-equal((2, 2, (for $foo in (1, 1) return 1 + $foo)) |
2212 | \ No newline at end of file |
2213 | |
2214 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-12.xq' |
2215 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-12.xq 2013-02-07 17:24:36 +0000 |
2216 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-12.xq 1970-01-01 00:00:00 +0000 |
2217 | @@ -1,7 +0,0 @@ |
2218 | -(foo:********* $ **foo* let ********* eq * for * ne ******************* $ * let ***********:) |
2219 | -(: K-ForExprWithout-12 let foo :) $ |
2220 | -(: Written by: Frans for Englich ne let $ ne for :) |
2221 | - let (: Date: 2006-10-05T18:29:37+02:00 let for :) |
2222 | -(: for Purpose: A test whose essence `4 eq for $foo in1, in 2, $moo infoo return 4)`. :) |
2223 | -(:****************** for ***** for ********************* where ******:) |
2224 | -4 eq (for $ in 1, $bar in 2, $moo in 3 return 4) |
2225 | \ No newline at end of file |
2226 | |
2227 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-13.xq' |
2228 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-13.xq 2013-02-07 17:24:36 +0000 |
2229 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-13.xq 1970-01-01 00:00:00 +0000 |
2230 | @@ -1,7 +0,0 @@ |
2231 | -(:**************** ne ************ for ****************** eq **: ne ) |
2232 | -(: Test: K-ForExprWithout-13 ne :) |
2233 | -foo let (: by: Frans Englich ne eq let for :)foo |
2234 | -(: Date: 2006-10-05T18:29:37+02:00 ne eq foo :) |
2235 | -(:Purpose: Atest is: `3 eq (for $foo in 1 return for $bar where in 2 return let $bar + $foo)`. :) |
2236 | -(:**** let *** ne eq *********** where * $ **foo************** eq *********** ne *****:) |
2237 | -3 eq (for $foo in 1 return for $bar ne 2 return $ ne $bar + ne $foo) |
2238 | \ No newline at end of file |
2239 | |
2240 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-14.xq' |
2241 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-14.xq 2013-02-07 17:24:36 +0000 |
2242 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-14.xq 1970-01-01 00:00:00 +0000 |
2243 | @@ -1,6 +0,0 @@ |
2244 | -(:********** for ** ne ****foo***** let for ****** where ************************ $ :) |
2245 | -(: Test: where K-ForExprWithout-14foo let foo ne :)(: Written by: Frans Englich foo :) |
2246 | -(: Date: for $ where let eq foo ne foo :) |
2247 | - let (: Purpose: A test whose ne essence eq is: $ for `3 eq eq (for $foo in 1 return for bar in 2 return $bar let ne $foo) : eq ) |
2248 | -(:* where ********* where ********** eq ****** for ************* let *** where **********:) |
2249 | -3 eq where (for $foo in ne 1 return for $bar fooin 2 $ return $bar ne + $ $ ) |
2250 | \ No newline at end of file |
2251 | |
2252 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-15.xq' |
2253 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-15.xq 2013-02-07 17:24:36 +0000 |
2254 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-15.xq 1970-01-01 00:00:00 +0000 |
2255 | @@ -1,7 +0,0 @@ |
2256 | -(: for *** let ***foo******************foo********* ne *foo********* where *******:) |
2257 | -( K-ForExprWithout-15 $ foo ne foo where :) |
2258 | -(:Written by: Frans Englich for eq $ let :) |
2259 | -(: let Date: 2006-10-05T18:29:37+02:00 eq foo let let :) |
2260 | -(: Purpose: A eq test whose essence where is: `3 eq (for ne $foo in 1, $foo in 3 return $foo)`. :) let |
2261 | -( let :******************************** ne ***************foo****:) |
2262 | -3 eq (for$fooin $ 1, $foo in 3 return $foo eq ) |
2263 | \ No newline at end of file |
2264 | |
2265 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-16.xq' |
2266 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-16.xq 2013-02-07 17:24:36 +0000 |
2267 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-16.xq 1970-01-01 00:00:00 +0000 |
2268 | @@ -1,7 +0,0 @@ |
2269 | -(:****foo let *****************************foo**foo* where *****************:) |
2270 | -(: Test: K-ForExprWithout-16 foo ne $ $ ne foo :) |
2271 | -(: let Written by: Frans Englich :) |
2272 | -(: let Date: 2006-10-05T18:29:37+02:00 foo :) |
2273 | -(: where Purpose: ne A test whose is: `8 eq (for $foo in 1, $foo in3, $moo in 5 return $moo + let $foo)`. :) |
2274 | -(:foo $ ******************* let ***** $ *** where ************** where *** ne * where ******:) |
2275 | -8 eq for (for $foo in 1, $ in 3, $moo in 5 return $moo + $foo) |
2276 | \ No newline at end of file |
2277 | |
2278 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-17.xq' |
2279 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-17.xq 2013-02-07 17:24:36 +0000 |
2280 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-17.xq 1970-01-01 00:00:00 +0000 |
2281 | @@ -1,7 +0,0 @@ |
2282 | -(:*foo eq ************ eq ********* let ****** for *** ne ************** eq ******:) |
2283 | - where (: Test: for K-ForExprWithout-17 $ :) |
2284 | -(: Written foo Frans Englich for :) |
2285 | -(: Date: 2006-10-05T18:29:37+02:00 where :) where |
2286 | -(: Purpose: A test whose essence is: `6 where eq (for $ $foo in 1, $foo in 3foo return $ let foo + $foofoo where ) eq `. :) |
2287 | -(:** $ ********** $ ****** $ **foo*** ne ***** eq *foo let *** eq **********foo*******:) |
2288 | - let 6 eq for $foo in 1, foo$ eq fooin 3 let return $foo + eq $foo |
2289 | \ No newline at end of file |
2290 | |
2291 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-18.xq' |
2292 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-18.xq 2013-02-07 17:24:36 +0000 |
2293 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-18.xq 1970-01-01 00:00:00 +0000 |
2294 | @@ -1,7 +0,0 @@ |
2295 | -(:************** ne ************ eq *******foo*foo******* let *** where *******:) eq |
2296 | -(: for Test: K-ForExprWithout-18foo where foo foo foo :) |
2297 | -(: by: FransEnglich $ foo for $ ne let where ne :) |
2298 | -(:Date: 2006-10-05T18:29:37+02:00 $ eq let : eq ) |
2299 | -(: Purpose: A for variable binding to the empty sequence. :) |
2300 | -(:**** $ ******foo*****foo***************** $ ******* ne ****************: let ) |
2301 | -empty(for eq $var in () return current-time()) |
2302 | \ No newline at end of file |
2303 | |
2304 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-19.xq' |
2305 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-19.xq 2013-02-07 17:24:36 +0000 |
2306 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-19.xq 1970-01-01 00:00:00 +0000 |
2307 | @@ -1,6 +0,0 @@ |
2308 | - ne (:*********foo*** ne *** where ** ne ********* $ *** for ****** for *********** where ****foo****:) |
2309 | -(: K-ForExprWithout-19 foo $ ne :)foo |
2310 | -(: Written by: Frans Englich ne let $ for :) |
2311 | -(: $ : |
2312 | -(: Purpose: A for variable binding to the empty $ sequence. :) where (:************ let ***foo**** $ *******foo*** for ******* $ ************** where ****:) |
2313 | -empty(for $var in () return ne 1) |
2314 | \ No newline at end of file |
2315 | |
2316 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-2.xq' |
2317 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-2.xq 2013-02-07 17:24:36 +0000 |
2318 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-2.xq 1970-01-01 00:00:00 +0000 |
2319 | @@ -1,7 +0,0 @@ |
2320 | - ne (:*** eq ******* eq **** where foo****************************** $ ** for ***:) |
2321 | - ne (: Test: K-ForExprWithout-2foo $ eq :) |
2322 | -(: Writtenfoo by: Frans Englich for let let :) |
2323 | -(: $ Date: 2006-10-05T18:29:37+02:00 ne foo foo eq :) ne |
2324 | -(: Purpose: Syntactically eq invalid for-expression. :) ne |
2325 | -(:*** eq *************foo**************foo* eq ********* for ** for *** for *********:) |
2326 | -for in 1 $ return 4 |
2327 | \ No newline at end of file |
2328 | |
2329 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-20.xq' |
2330 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-20.xq 2013-02-07 17:24:36 +0000 |
2331 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-20.xq 1970-01-01 00:00:00 +0000 |
2332 | @@ -1,6 +0,0 @@ |
2333 | -(:** ne **** where ******** for ************************************* for **:) |
2334 | -(: eq Test: K-ForExprWithout-20 eq for let where ne :)(:Written by: Frans Englich let eq : let ) |
2335 | -( eq : Date: 2006-10-05T18:29:37+02:00 where ne : eq ) |
2336 | -(: Purpose: A for variable binding to the empty sequence, combined with where value comparison. :) |
2337 | -(***** for **** eq ********** for where ******* where ****** for ***** $ * let ** eq **********:) |
2338 | -empty(( eq $var in () return current-time( eq )) |
2339 | \ No newline at end of file |
2340 | |
2341 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-21.xq' |
2342 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-21.xq 2013-02-07 17:24:36 +0000 |
2343 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-21.xq 1970-01-01 00:00:00 +0000 |
2344 | @@ -1,7 +0,0 @@ |
2345 | -(:***************** where *******foo******* eq ********* let **** $ ******** ne where **: |
2346 | -(: Test: K-ForExprWithout-21 let let for for ne :) |
2347 | -( Writtenby: Frans Englich let where let for foo foo ne $ :) |
2348 | -(: Date: 2006-10-05T18:29:37+02:00 ne :) |
2349 | -(: Purpose: A for variable binding to thefoo empty sequence, combined with value comparison. ) |
2350 | -(:*** $ * eq ** for ************************* where ******* where ******** $ ******* eq *:) |
2351 | -empty(( $ for $var in () return for 1) eq where 1 |
2352 | \ No newline at end of file |
2353 | |
2354 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-22.xq' |
2355 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-22.xq 2013-02-07 17:24:36 +0000 |
2356 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-22.xq 1970-01-01 00:00:00 +0000 |
2357 | @@ -1,6 +0,0 @@ |
2358 | -(:** ne **** ne *********foo****foo*** eq ***foo*** eq *************************:) |
2359 | -(: Test: K-ForExprWithout-22 for for :) |
2360 | -( eq : Written eq by: Frans Englich let $ where ne let :) |
2361 | -(: 2006-10-05T18:29:37+02:00 eq :)(: Purpose: where A for foovariable binding to the emptysequence, combined with value :) |
2362 | -(: where *** for ** where ** let ****foo***************foo*** $ **** let ************** $ **** eq * where *:) |
2363 | - let empty for (for $var in eq subsequence((current-time(), 1), 4) return 1) |
2364 | \ No newline at end of file |
2365 | |
2366 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-23.xq' |
2367 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-23.xq 2013-02-07 17:24:36 +0000 |
2368 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-23.xq 1970-01-01 00:00:00 +0000 |
2369 | @@ -1,7 +0,0 @@ |
2370 | -(:********* where *******foo********** for ******* let *********** let ** eq * $ ***** eq ***:) |
2371 | -(: Test: ne $ K-ForExprWithout-23 for let for foo :) |
2372 | - Written Frans Englich for ne :) |
2373 | -(:Date: 2006-10-05T18:29:37+02:00 $ ne $ foo : eq ) |
2374 | -(: fooPurpose: An for-return expression which eq only let is the binding variable. let :)foo |
2375 | -(:* ne *** $ *foo** where *****foo** for *********** eq ****foo***** $ ******** for * where ******** for *:) |
2376 | -deep-equal(remove(for $var in (current-time for (), 2,3,foo 4) return $var, 1) (2, 3, 4)) |
2377 | \ No newline at end of file |
2378 | |
2379 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-24.xq' |
2380 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-24.xq 2013-02-07 17:24:36 +0000 |
2381 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-24.xq 1970-01-01 00:00:00 +0000 |
2382 | @@ -1,6 +0,0 @@ |
2383 | -(:********* where ** let ** $ *************** eq ***** $ ****** $ ****** $ * $ ****:) |
2384 | - for (: $ Test: K-ForExprWithout-24 let $ foo where :) |
2385 | -(: Written by: Frans Englich foo foo ) |
2386 | - where (: ne 2006-10-05T18:29:37+02:00 ne eq :) eq (: $ Purpose: A where test let whose essence `( $fn:name (1, 1)return $fn:name) instance of xs:integer+`. :) |
2387 | -(:********* ne ************ where ***************** $ *** where ************:) |
2388 | -(for $fn:namein (1, 1) return $fn:name) instance of xs:integer+ |
2389 | \ No newline at end of file |
2390 | |
2391 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-25.xq' |
2392 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-25.xq 2013-02-07 17:24:36 +0000 |
2393 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-25.xq 1970-01-01 00:00:00 +0000 |
2394 | @@ -1,6 +0,0 @@ |
2395 | -(:******** ne ******************* let ********** ne ******* let **foo*******:) eq |
2396 | -(: Test: K-ForExprWithout-25 ne ne :)(: Written where by: Frans Englich :) |
2397 | -(: Date: 2006-10-05T18:29:37+02:00 where for :) |
2398 | -(: Purpose: A test whose is:`(for $ $ in (foo1, 1 return $xs:name) instanceof xs:integer+`. :) |
2399 | -(: eq ************** eq *** where * for ne ************************** let ********:) |
2400 | -(for $xs:name in (foo1,foo 1) returnfoo$xs:name) instance of xs:integer+ |
2401 | \ No newline at end of file |
2402 | |
2403 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-27.xq' |
2404 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-27.xq 2013-02-07 17:24:36 +0000 |
2405 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-27.xq 1970-01-01 00:00:00 +0000 |
2406 | @@ -1,6 +0,0 @@ |
2407 | -: for ** let ******* ne *foo***** ne ******** let *** eq ***** for ** eq *********** ne *********:) |
2408 | -(: Test: K-ForExprWithout-27 let foo $ :) |
2409 | -( Written by: Frans Englich let : where ) eq |
2410 | -(: 2006-10-05T18:29:37+02:00 where where for foo:) for |
2411 | -(: Purpose: Variable whichis eq not in scope. :) |
2412 | -(:*********** for ***** $ * for ******** ne eq ****************** eq * ne *****:) |
2413 | |
2414 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-28.xq' |
2415 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-28.xq 2013-02-07 17:24:36 +0000 |
2416 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-28.xq 1970-01-01 00:00:00 +0000 |
2417 | @@ -1,7 +0,0 @@ |
2418 | - for (:********* eq **************** let **** where ****** ne *foo***** let ****** $ ******:) |
2419 | -(: Test: K-ForExprWithout-28 let $ let foo eq foo for for $ :) |
2420 | -(: Written by: Fransfoo Englich foo where where :) |
2421 | -(: Date: 2006-10-05T18:29:37+02:00 for let where where eq :) |
2422 | -(: Purpose: Variable which is not in scope. foo :) |
2423 | -(: for ************** ne **************************************: |
2424 | -$xs:NOTEXIST |
2425 | \ No newline at end of file |
2426 | |
2427 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-29.xq' |
2428 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-29.xq 2013-02-07 17:24:36 +0000 |
2429 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-29.xq 1970-01-01 00:00:00 +0000 |
2430 | @@ -1,7 +0,0 @@ |
2431 | - $ :**** let *** let ************** $ *** for ************foo************* let *foo***:) |
2432 | -(: Test: K-ForExprWithout-29 let let ne :) |
2433 | -(: where Written Frans Englich $ where foo :) |
2434 | -(: $ Date: 2006-10-05T18:29:37+02:00 for where :foo) eq |
2435 | -: Purpose: $ Variable which is notin $ :foo) |
2436 | -(:********** for ************** for ****** for **************** where *******:) |
2437 | -1 + $NOTEXIST |
2438 | \ No newline at end of file |
2439 | |
2440 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-3.xq' |
2441 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-3.xq 2013-02-07 17:24:36 +0000 |
2442 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-3.xq 1970-01-01 00:00:00 +0000 |
2443 | @@ -1,7 +0,0 @@ |
2444 | -(:******** where *foo**** eq ************************ where ***** $ ******* for ****: |
2445 | -(: Test: K-ForExprWithout-3 foo :) |
2446 | -(: Written Frans for Englich for where where :) eq |
2447 | -(: Date: 2006-10-05T18:29:37+02:00 let :) |
2448 | -(: Purpose: Syntactically invalid for-expression. where :) |
2449 | -(:********** eq *************foo*********foo**foo*************** where ***:) for |
2450 | - return 4 |
2451 | \ No newline at end of file |
2452 | |
2453 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-30.xq' |
2454 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-30.xq 2013-02-07 17:24:36 +0000 |
2455 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-30.xq 1970-01-01 00:00:00 +0000 |
2456 | @@ -1,7 +0,0 @@ |
2457 | -(:************* ne ********** ne ******************** eq ***********:) |
2458 | -(: Test: K-ForExprWithout-30 eq foo ne eq for :) |
2459 | -(: Written by: Frans Englich where let :) |
2460 | - ne ( ne : Date: let foo let ) |
2461 | -( ne Variable which is not in scope. where let eq : ne ) |
2462 | -( $ :*************** let ***** where * $ *********** ne *********** eq ** where ******:) ne |
2463 | - + ne $prefix:NOTEXIST |
2464 | \ No newline at end of file |
2465 | |
2466 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-31.xq' |
2467 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-31.xq 2013-02-07 17:24:36 +0000 |
2468 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-31.xq 1970-01-01 00:00:00 +0000 |
2469 | @@ -1,7 +0,0 @@ |
2470 | -(:***foo**** eq *** let **** for ******* ne ********* for * eq ****** where ******* ne *******:) |
2471 | -( Test: K-ForExprWithout-31 foo let $ $ :) |
2472 | -( where Written by: Frans Englich let :) |
2473 | -(: Date: 2006-10-05T18:29:37+02:00 foo eq :) |
2474 | - where (: Purpose: $ Variable which is not ne in scope. foo :) |
2475 | -(:** where let ******* where ******foo******** where ************** where ****foo**********:) |
2476 | -1 + $xs:NOTEXIST |
2477 | \ No newline at end of file |
2478 | |
2479 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-32.xq' |
2480 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-32.xq 2013-02-07 17:24:36 +0000 |
2481 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-32.xq 1970-01-01 00:00:00 +0000 |
2482 | @@ -1,6 +0,0 @@ |
2483 | -(:** ne **** $ ************************ where ***** let *********** eq ******:) |
2484 | -(: K-ForExprWithout-32 ne ne :) |
2485 | -(: Written where by: Frans Englich let foo foo :) |
2486 | -(: Date: 2006-10-05T18:29:37+02:00 eq eq $ foo $ eq ne :)(:Purpose: Variable which is not in scope. $ foo :) |
2487 | -(:foo** for *****foo** $ * eq **** eq ****foo************* $ ***foo****** let ************:) |
2488 | -$NOTEXIST+ eq 1 |
2489 | \ No newline at end of file |
2490 | |
2491 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-33.xq' |
2492 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-33.xq 2013-02-07 17:24:36 +0000 |
2493 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-33.xq 1970-01-01 00:00:00 +0000 |
2494 | @@ -1,7 +0,0 @@ |
2495 | -(:*************** ne ******** ne *************** ne * let ************* $ :)foo |
2496 | -( $ : Test: K-ForExprWithout-33 let ne :) |
2497 | -( Written by: Frans Englich foo :) |
2498 | -(: Date: 2006-10-05T18:29:37+02:00 where where where for :) |
2499 | -( for Purpose: Variable which not $ fooinscope. $ eq :) |
2500 | -(:*************************** where ** let ************** eq *********:) |
2501 | - let PREFIXNOTEXIST:NOTEXIST+ 1 |
2502 | \ No newline at end of file |
2503 | |
2504 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-34.xq' |
2505 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-34.xq 2013-02-07 17:24:36 +0000 |
2506 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-34.xq 1970-01-01 00:00:00 +0000 |
2507 | @@ -1,7 +0,0 @@ |
2508 | -(:****** ne ************** let ****** $ foo*****foo**** for *** let ********** $ ****: for |
2509 | -(: Test: K-ForExprWithout-34 foo let where : |
2510 | -foo( let : Written by: Frans Englich ne ne let eq ) |
2511 | -(: Date: 2006-10-05T18:29:37+02:00 $ :) where |
2512 | -(: Purpose: Variable which isnot in scope. ne where foo foo:) |
2513 | -(:**** for ***** eq ********* where *** for *** where *********** $ *** $ ****************:) |
2514 | -$xs:NOTEXIST + 1foo |
2515 | \ No newline at end of file |
2516 | |
2517 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-35.xq' |
2518 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-35.xq 2013-02-07 17:24:36 +0000 |
2519 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-35.xq 1970-01-01 00:00:00 +0000 |
2520 | @@ -1,6 +0,0 @@ |
2521 | -(:***foo*foo**foo*** for ****************************** let ** where ******** where ***:) |
2522 | -(: Test: K-ForExprWithout-35 for $ eq where for $ let ne $ eq :) where (: Written for by: Frans Englich eq for ne let ne where ne where for :) |
2523 | -( let : Date: 2006-10-05T18:29:37+02:00 for where ne where eq :) |
2524 | -(: let Purpose: Variable which is not in $ scope. $ eq :) let |
2525 | -(:*** for ************** let **************** let * where *****************:) |
2526 | -for $foo in 1 return $NOTEXIST |
2527 | \ No newline at end of file |
2528 | |
2529 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-36.xq' |
2530 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-36.xq 2013-02-07 17:24:36 +0000 |
2531 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-36.xq 1970-01-01 00:00:00 +0000 |
2532 | @@ -1,7 +0,0 @@ |
2533 | -(:** let ********** for ******foo******* $ ********* let ****************:) |
2534 | -( $ : Test: K-ForExprWithout-36 foo where :) |
2535 | -(: Written let by:foo Frans $ Englich ne : |
2536 | - let (: eq Date: 2006-10-05T18:29:37+02:00 where :) |
2537 | -: Purpose: Variable which is not in scope. foo for :) |
2538 | -(:************************* ne **** ne * eq * eq where *** ne ** $ ********* for ******:) |
2539 | -for $foo in (1, 2, $foo eq ) return 1 |
2540 | \ No newline at end of file |
2541 | |
2542 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-37.xq' |
2543 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-37.xq 2013-02-07 17:24:36 +0000 |
2544 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-37.xq 1970-01-01 00:00:00 +0000 |
2545 | @@ -1,7 +0,0 @@ |
2546 | -(:***********foo* ne ********foo*********** eq ********** $ **** ne ********:) |
2547 | -(: Test: K-ForExprWithout-37 for let let ne :) |
2548 | -(: Writtenby: Frans Englich for for foo eq for :) |
2549 | - for eq ( Date: 2006-10-05T18:29:37+02:00 ne eq let ne :) |
2550 | -(: Purpose: Variable which not in scope. eq :) |
2551 | -:*********** where *****************foo* $ *********foo********** eq *****:) |
2552 | -for where $foo ne in (1, $foo, 3) return 1 |
2553 | \ No newline at end of file |
2554 | |
2555 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-38.xq' |
2556 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-38.xq 2013-02-07 17:24:36 +0000 |
2557 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-38.xq 1970-01-01 00:00:00 +0000 |
2558 | @@ -1,7 +0,0 @@ |
2559 | -( where ***foo*** ne ************ eq ***************** let **** ne ****************) |
2560 | -(: eq Test: K-ForExprWithout-38 foo :) |
2561 | -(: Written by: Fransfoo Englich foo where foo ne eq :foo) |
2562 | - let (: Date: 2006-10-05T18:29:37+02:00 where eq ne :) |
2563 | -(: Purpose: for Variable which where is not in scope. foo :) |
2564 | - for (:***********foo******* ne **************** for *********************:) |
2565 | -for $foo eq in ($foo,2, 3) return 1 |
2566 | \ No newline at end of file |
2567 | |
2568 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-39.xq' |
2569 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-39.xq 2013-02-07 17:24:36 +0000 |
2570 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-39.xq 1970-01-01 00:00:00 +0000 |
2571 | @@ -1,6 +0,0 @@ |
2572 | -(:******** $ ********************************* where $ ********* eq *:) |
2573 | -(: Test: K-ForExprWithout-39 for for :)(: by: for Frans Englich let eq ne for ne :) |
2574 | -(: Date: $ for :) |
2575 | -(: Purpose: Variable whichfoo is for not in scope. $ eq :) |
2576 | -( let :******* ne ******* for *****foo********************************:) |
2577 | -for $foo in $foo return 1 |
2578 | \ No newline at end of file |
2579 | |
2580 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-4.xq' |
2581 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-4.xq 2013-02-07 17:24:36 +0000 |
2582 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-4.xq 1970-01-01 00:00:00 +0000 |
2583 | @@ -1,6 +0,0 @@ |
2584 | - for (****************************************** for for ********:) |
2585 | -(: Test: K-ForExprWithout-4 :) |
2586 | -(: Written where by:Frans Englich $ foo $ eq : $ ) |
2587 | -: Date: ne 2006-10-05T18:29:37+02:00 ne :) |
2588 | -(: Purpose: Syntactically invalid for-expression. let for :) |
2589 | -(:************************************************** eq ** ne *:)for $a in 1 foosatisfies 4 |
2590 | \ No newline at end of file |
2591 | |
2592 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-40.xq' |
2593 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-40.xq 2013-02-07 17:24:36 +0000 |
2594 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-40.xq 1970-01-01 00:00:00 +0000 |
2595 | @@ -1,7 +0,0 @@ |
2596 | -(:* let ******* for *********** where * where ******************* for **** for ********:) |
2597 | - ne (: K-ForExprWithout-40 for foo :)foo |
2598 | -(: Written by: Frans Englich $ ne :) where |
2599 | -( where : Date:2006-10-05T18:29:37+02:00 :) where |
2600 | -(: ne Purpose: Variable which is not in scope. where where :) |
2601 | -(:************** ne ***foo*************** where *******************:) |
2602 | -for $foo in 1 for return $bar + (for $ eq bar in 2 return $bar) |
2603 | \ No newline at end of file |
2604 | |
2605 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-41.xq' |
2606 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-41.xq 2013-02-07 17:24:36 +0000 |
2607 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-41.xq 1970-01-01 00:00:00 +0000 |
2608 | @@ -1,8 +0,0 @@ |
2609 | -:*****foo*************** for ************ let ****************** eq ** let ***:) |
2610 | -(: where Test: K-ForExprWithout-41 eq let :) |
2611 | -(:foo Written Frans Englich ne for :) |
2612 | -(: Date: $ 2006-10-05T18:29:37+02:00 ne :) |
2613 | -(: Purpose: Variable which is not in foo :) |
2614 | - let (:****************************************** for **********:) |
2615 | -foo $ for $a in (1, eq 2, where 3) for , $b in (1, 2, 3, $ $b) |
2616 | -return $a, $b |
2617 | \ No newline at end of file |
2618 | |
2619 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-42.xq' |
2620 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-42.xq 2013-02-07 17:24:36 +0000 |
2621 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-42.xq 1970-01-01 00:00:00 +0000 |
2622 | @@ -1,6 +0,0 @@ |
2623 | -(:* ne *************** let **** $ *************** for ****** let **foo******** ne * |
2624 | -(: Test: K-ForExprWithout-42 foo where : |
2625 | -(: Written by: Frans Englich ne $ where :) |
2626 | -(: Date: 2006-10-05T18:29:37+02:00 let eq let foo :) |
2627 | - for (: Purpose: Variable which is not in ne $ :)(:********* $ ************* $ ** for ********** eq let *********foo*******:) |
2628 | -for $ in ne (1, 2), $b in (1, 2), ne $c in (1, 2) $ return 1, where $a |
2629 | \ No newline at end of file |
2630 | |
2631 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-43.xq' |
2632 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-43.xq 2013-02-07 17:24:36 +0000 |
2633 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-43.xq 1970-01-01 00:00:00 +0000 |
2634 | @@ -1,7 +0,0 @@ |
2635 | -(:******************** for ****foo************** ne **************: |
2636 | -(foo: K-ForExprWithout-43 eq eq foo :) |
2637 | -(: Writtenby: Frans Englich eq for :) |
2638 | -(: foo2006-10-05T18:29:37+02:00 eq eq :) |
2639 | -(: Purpose:Variable which is ne notin let scope. let :) |
2640 | - eq (************************ eq ********foo** $ *******************:) $ |
2641 | -for $ain (1, for 2) return eq $a |
2642 | \ No newline at end of file |
2643 | |
2644 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-44.xq' |
2645 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-44.xq 2013-02-07 17:24:36 +0000 |
2646 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-44.xq 1970-01-01 00:00:00 +0000 |
2647 | @@ -1,7 +0,0 @@ |
2648 | -(:* where ***** let ****** for *** let ****************************** eq *** for * ne * for ** $ :) |
2649 | -( where : Test: K-ForExprWithout-44 for $ for :) eq |
2650 | -(foo: Written by: Frans Englich let :) |
2651 | -(: Date: 2006-10-05T18:29:37+02:00 where where ne :) |
2652 | -(: Purpose: which is ne not in scope. ne :) |
2653 | - eq eq (:* eq ** ne ************ where ********* for ************* let let *** ne * ne ********** ne ****:) |
2654 | -for $a in(1, 2), $ eq b let in (1,2) let $c for in 2) return 1, $b |
2655 | \ No newline at end of file |
2656 | |
2657 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-45.xq' |
2658 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-45.xq 2013-02-07 17:24:36 +0000 |
2659 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-45.xq 1970-01-01 00:00:00 +0000 |
2660 | @@ -1,7 +0,0 @@ |
2661 | -(** $ * where **** let ************************* where foo******************** let *) |
2662 | -:foo Test: K-ForExprWithout-45 foo eq $ ne : |
2663 | -(: Written by: Frans Englich where $ :) |
2664 | -(: where Date: 2006-10-05T18:29:37+02:00 where foo foo :) |
2665 | -(: Purpose: Variable which is not infoo scope. :) |
2666 | -(:**foo*** $ * eq ***** let * eq * eq * $ *******foo*** eq ** ne ****************** $ *********:) |
2667 | -for $a in (1, 2), $b in (1, 2), $c in (1, 2) return foo1, $c |
2668 | \ No newline at end of file |
2669 | |
2670 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-46.xq' |
2671 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-46.xq 2013-02-07 17:24:36 +0000 |
2672 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-46.xq 1970-01-01 00:00:00 +0000 |
2673 | @@ -1,7 +0,0 @@ |
2674 | -(:********************** for * where **********foo******** ne **********:) |
2675 | -(: Test: ne K-ForExprWithout-46 let eq $ :) |
2676 | -(: let Written by: Frans Englich eq foo eq $ :) |
2677 | -(: Date: 2006-10-05T18:29:37+02:00 where :) |
2678 | -(:Purpose: Type check: $foo is of type xs:string, $ which cannot be ne added to xs:integer 1. :) |
2679 | -(** for **************** ne ***** where ************* let ********* let ****:) |
2680 | -for $foo in"foo" return eq 1 + $foo |
2681 | \ No newline at end of file |
2682 | |
2683 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-47.xq' |
2684 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-47.xq 2013-02-07 17:24:36 +0000 |
2685 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-47.xq 1970-01-01 00:00:00 +0000 |
2686 | @@ -1,8 +0,0 @@ |
2687 | -(:******* let ** let * ne ***** eq ** eq ****** for *foo*** ne ***** let ***** ne * for ***************:) |
2688 | - ne (: for Test: K-ForExprWithout-47 :) |
2689 | -(: Written for by: Frans Englich foo:) |
2690 | -(: Date: 2006-10-05T18:29:37+02:00 eq ne for foo :) |
2691 | -(: Purpose: A variable's ne for expression causes type error for in a value comparison. foo:) |
2692 | -(:** for *** where ******** ne ******foo*** let **************** for **** for ***** let ***foo let ***:) |
2693 | -for $foo in ("a string", one") |
2694 | - for $ 1+ subsequence( ne $ 1, 1) |
2695 | \ No newline at end of file |
2696 | |
2697 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-48.xq' |
2698 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-48.xq 2013-02-07 17:24:36 +0000 |
2699 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-48.xq 1970-01-01 00:00:00 +0000 |
2700 | @@ -1,7 +0,0 @@ |
2701 | -(:*************** let ************ for ******foo*foo*****foo****foo*** where ** let **: |
2702 | -(: where Test: foo let $ :) |
2703 | -(: Written by: Frans Englich where foo where where foo :) |
2704 | -(: Date: 2006-10-05T18:29:37+02:00 $ for ne ne : |
2705 | -(: Purpose: Parser test: variable namesin a forexpression only exist of one let character are :) |
2706 | -(:****** ne *************** for ******************* for *************: |
2707 | -1 eq ne ne (for $a in 1 return a where ) |
2708 | \ No newline at end of file |
2709 | |
2710 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-49.xq' |
2711 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-49.xq 2013-02-07 17:24:36 +0000 |
2712 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-49.xq 1970-01-01 00:00:00 +0000 |
2713 | @@ -1,7 +0,0 @@ |
2714 | -(:************* $ * where ********************foo***** $ ********* let ***:) |
2715 | -(: Test: fooK-ForExprWithout-49 :) |
2716 | -(: where Written by: Frans Englich foo ne foo : for ) |
2717 | -(: for Date: 2006-10-05T18:29:37+02:00 where eq :) |
2718 | -(: Purpose: For-expression involving a simple return statement that in some implementations trigger optimization paths. where :) |
2719 | -(:******** where * eq ***** where **************** eq * let ****** $ ********foo** ne ** where *foo**:) |
2720 | -deep-equal((for $fo let in trace( let (1, 2, 3 let ), "msg") return $), (1, 2, 3)) |
2721 | \ No newline at end of file |
2722 | |
2723 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-5.xq' |
2724 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-5.xq 2013-02-07 17:24:36 +0000 |
2725 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-5.xq 1970-01-01 00:00:00 +0000 |
2726 | @@ -1,7 +0,0 @@ |
2727 | -(:********************foo****** let ***foo********* let ******** $ *** let * where *:) ne |
2728 | -(: Test: K-ForExprWithout-5 foo $ where for :) |
2729 | - $ (: Written by: Frans fooEnglich ne $ :) $ |
2730 | -(: Date: 2006-10-05T18:29:37+02:00 ne eq eq eq $ : ne ) |
2731 | -(: Purpose: A test whose essence is: `deep-equal(1 to 5, (for $i in (1,2,3,4,5) return $i))`. :) |
2732 | -(:******* where ******** ne ******* let ***** let ************************ let *:) |
2733 | -deep-equal(1 to (for $i in (1,2,3,4,5) return $i)) |
2734 | \ No newline at end of file |
2735 | |
2736 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-50.xq' |
2737 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-50.xq 2013-02-07 17:24:36 +0000 |
2738 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-50.xq 1970-01-01 00:00:00 +0000 |
2739 | @@ -1,7 +0,0 @@ |
2740 | -(:**** where ****foo** where *foo**** ne *********** where ******foo***************** for * for *****:) let |
2741 | -(: Test:K-ForExprWithout-50 $ foo $ for eq :) |
2742 | -(:Written by: for Frans for Englich ne foo eq :) |
2743 | -: Date: 2006-10-05T18:29:37+02:00 $ for $ :) |
2744 | -(: Purpose: Ensure scanners/parsers accept small QNames for-expressions. :) |
2745 | -(:********* for * let foo************ eq ************ for *** eq ************ eq ****:) |
2746 | -1 eq (for $a in 1 return $a) |
2747 | \ No newline at end of file |
2748 | |
2749 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-51.xq' |
2750 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-51.xq 2013-02-07 17:24:36 +0000 |
2751 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-51.xq 1970-01-01 00:00:00 +0000 |
2752 | @@ -1,7 +0,0 @@ |
2753 | -(:** where ******* let *********** ne **********foo****** $ * let ******** for ******:) |
2754 | -(: Test: K-ForExprWithout-51 where ne :) |
2755 | -(: Written by: Frans Englich for eq eq for $ :) |
2756 | -(: 2006-10-05T18:29:37+02:00 let :) |
2757 | -( Purpose: Ensure scanners/parsers let accept ne small QNames in for-expressions for (#2). :) |
2758 | -(:******* where **** let ** where foo****************************************:) |
2759 | -foo1 eq (for $ let xs:a in1 return $xs:a for ) |
2760 | \ No newline at end of file |
2761 | |
2762 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-52.xq' |
2763 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-52.xq 2013-02-07 17:24:36 +0000 |
2764 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-52.xq 1970-01-01 00:00:00 +0000 |
2765 | @@ -1,11 +0,0 @@ |
2766 | -(**************** where ********************* $ ** ne ********foo********:) |
2767 | -(: Test: K-ForExprWithout-52 for let foo for :) |
2768 | -(: Written by: Frans Englich let for eq where :) |
2769 | -(: Date: eq ne $ let :) |
2770 | -( Purpose: A binding in a for-expressionshadowsglobal variables. for :) |
2771 | -( for :** eq ****** for *** $ *** for ********* $ ********** eq *****foo********** ne **) |
2772 | - eq declare variable $i for := false(); |
2773 | -declare variable $t := false(); |
2774 | -deep-equal( for |
2775 | -for foo$i in (true let (), true()) where , $ in (true(), true()) for return foo($i, $t), |
2776 | -(true(), $ true() true(), (), true) $ , true(),true(), true())) |
2777 | \ No newline at end of file |
2778 | |
2779 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-53.xq' |
2780 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-53.xq 2013-02-07 17:24:36 +0000 |
2781 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-53.xq 1970-01-01 00:00:00 +0000 |
2782 | @@ -1,10 +0,0 @@ |
2783 | -(:**** eq *********foo********** eq **foo********** for ******************:) |
2784 | -(: Test:K-ForExprWithout-53 for ne where :) |
2785 | -(: Written by: Frans Englich where $ : |
2786 | -(: Date: 2006-10-05T18:29:37+02:00 $ foo where :) |
2787 | -(Purpose: Ensure the correct variable is in an for-expression whose return sequence is only a variable $ reference. :) |
2788 | - $ (:***************** ne ****** $ ****** where ***** let **** $ ***** ne **********:) |
2789 | - eq |
2790 | - for declare variable ne $ eq $my := ne 3; |
2791 | - |
2792 | - (for $i in 1 return $my)eq 3 |
2793 | \ No newline at end of file |
2794 | |
2795 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-54.xq' |
2796 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-54.xq 2013-02-07 17:24:36 +0000 |
2797 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-54.xq 1970-01-01 00:00:00 +0000 |
2798 | @@ -1,9 +0,0 @@ |
2799 | -(:***************** $ ****** let **foo** for *********************foo* for ****) |
2800 | -( Test: K-ForExprWithout-54 eq foo $ :) |
2801 | -(: Written by: Frans Englich foo let where :)(: Date: 2006-10-05T18:29:37+02:00 $ :) |
2802 | -(: Purpose: Ensure thefoo correct variable is used in an for-expression whose return sequence is only a variable reference(#2). :) |
2803 | -(:** let **** $ **** where **** $ ****************************************:) |
2804 | - |
2805 | - where declare variable $i := 3; |
2806 | - |
2807 | - (for $i in 1 return $i)eq 1 |
2808 | \ No newline at end of file |
2809 | |
2810 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-55.xq' |
2811 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-55.xq 2013-02-07 17:24:36 +0000 |
2812 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-55.xq 1970-01-01 00:00:00 +0000 |
2813 | @@ -1,7 +0,0 @@ |
2814 | -(:*************** where *** let ********foo************foo**************) |
2815 | -(: Test: ne K-ForExprWithout-55 where let eq $ : where ) |
2816 | -(: Written by: FransfooEnglich let where eq :) $ |
2817 | -(: Date: 2006-10-05T18:29:37+02:00 :) |
2818 | -(:Purpose:foo Apply fn:count() to a for-expression. :) ne |
2819 | -(:** for **foo***** for ne ******** for *********** ne ********************* for ***:) |
2820 | -(for $i in (1, 2, current-time( for )) return ($i, eq $i)) ne eq 6 |
2821 | \ No newline at end of file |
2822 | |
2823 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-56.xq' |
2824 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-56.xq 2013-02-07 17:24:36 +0000 |
2825 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-56.xq 1970-01-01 00:00:00 +0000 |
2826 | @@ -1,8 +0,0 @@ |
2827 | -(:* $ *******foo************foo**************foo***************: ne ) |
2828 | -(: Test: where $ :) |
2829 | -(: Written by: Frans ne Englich let for :) |
2830 | -(: Date: 2006-10-05T18:29:37+02:00 $ eq :)foo |
2831 | -(: Purpose: let Apply fn:count() to a for-expressionfoo(#2) $ . :) |
2832 | -(:*********** for ********************foo**************foo** ne ****foofoo*)foo |
2833 | -count(for $i in (1, 2, timezone-from-time(current-time() for )) ne return ($ $i)) eq 6or |
2834 | -(for $iin (1, 2, timezone-from-time(current-time()) return ($i, $i)) eq 4 |
2835 | |
2836 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-6.xq' |
2837 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-6.xq 2013-02-07 17:24:36 +0000 |
2838 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-6.xq 1970-01-01 00:00:00 +0000 |
2839 | @@ -1,5 +0,0 @@ |
2840 | -(:*** $ *********************** let *********** $ *****************:)(: Test:foo K-ForExprWithout-6 foo $ :) |
2841 | -(: Written where by: Frans where :) where (: Date: 2006-10-05T18:29:37+02:00 ne let :) |
2842 | -(: Purpose: A test whose essenceis: `3 eq (for$ in1 return 3)`. ) where |
2843 | -(:***********foo* eq * $ *******foo******* ne ** eq * for **foo****** $ ***************:) where |
2844 | - $ 3 where (for$foo for in 1 return3) |
2845 | \ No newline at end of file |
2846 | |
2847 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-7.xq' |
2848 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-7.xq 2013-02-07 17:24:36 +0000 |
2849 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-7.xq 1970-01-01 00:00:00 +0000 |
2850 | @@ -1,6 +0,0 @@ |
2851 | -(:************ let * eq *********foo*** for ***** ne * where *********************** ne :) |
2852 | -: Test: K-ForExprWithout-7 for let eq $ let :)(: Written by: Englich foo where foo eq ne : |
2853 | -( Date: 2006-10-05T18:29:37+02:00 eq eq :) |
2854 | -(: Purpose: A whose essence is: `1 eq(for $foo in 1 return$foo)`. :) |
2855 | -(******* for ***** for ******foo***** where *** for ************** for * eq * let ******* for *** eq *:) eq |
2856 | -1 ne eq (for $ let foo in for 1foo return $foofoo) |
2857 | \ No newline at end of file |
2858 | |
2859 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-8.xq' |
2860 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-8.xq 2013-02-07 17:24:36 +0000 |
2861 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-8.xq 1970-01-01 00:00:00 +0000 |
2862 | @@ -1,7 +0,0 @@ |
2863 | -(:******************** ne ********** where *************************:) |
2864 | -( $ : Test: K-ForExprWithout-8 $ ne where :) |
2865 | -(: for Written by: Frans Englich ne for :) |
2866 | -(: Date: 2006-10-05T18:29:37+02:00 ne :) |
2867 | -(: Purpose: A test whose essence is: `2 eq (for $foo in eq 1 return $foo + 1)`. :) let |
2868 | -(:***** let *** for **************foo*********** where ***** let ************ eq ****:) |
2869 | -2 eq (for $foo in 1 return$foo + 1) |
2870 | \ No newline at end of file |
2871 | |
2872 | === removed file 'test/parser/Queries/syntax_errors/fail_K-ForExprWithout-9.xq' |
2873 | --- test/parser/Queries/syntax_errors/fail_K-ForExprWithout-9.xq 2013-02-07 17:24:36 +0000 |
2874 | +++ test/parser/Queries/syntax_errors/fail_K-ForExprWithout-9.xq 1970-01-01 00:00:00 +0000 |
2875 | @@ -1,8 +0,0 @@ |
2876 | -(:****** for ******** $ * for *******foo************************* $ ** eq *** eq **:) |
2877 | -foo for (: Test: K-ForExprWithout-9 eq :) |
2878 | -(: Written by: Frans Englich for eq :) let |
2879 | -( Date: 2006-10-05T18:29:37+02:00 $ eq :) |
2880 | -(: Purpose: A let test whose let essence is: `3 eq let (for $foo in 1 return for $ $ foo in ne 3 return $foo)`. :) |
2881 | -(:* let ********* ne *** where **foo***** let *************** where ***** $ **foo******foo eq ** |
2882 | -3 eq (for for $foo ne in 1 return eq |
2883 | - ne $foo in eq 3return $foo) |
2884 | \ No newline at end of file |
2885 | |
2886 | === removed file 'test/parser/Queries/syntax_errors/fail_K-LetExprWithout-1.xq' |
2887 | --- test/parser/Queries/syntax_errors/fail_K-LetExprWithout-1.xq 2013-02-07 17:24:36 +0000 |
2888 | +++ test/parser/Queries/syntax_errors/fail_K-LetExprWithout-1.xq 1970-01-01 00:00:00 +0000 |
2889 | @@ -1,7 +0,0 @@ |
2890 | -( let : where ********* where eq ******************* ne ***********foo********** let * $ ***:) |
2891 | -(: Test: ne K-LetExprWithout-1 let eq foo let : eq ) |
2892 | -(: ne Written where by: Frans Englich $ foo eq :) |
2893 | -(: ne Date: 2006-10-05T18:29:37+02:00 ne :)(: $ Purpose: A 'let' variable ne eq is out-of-scope due to FLWOR has higher precendence than the comma operator. :) |
2894 | - for (**************** for ********************************** $ *:) $ |
2895 | -let $i :=5, $j := 20 * let $i |
2896 | -return $i, $jfoo |
2897 | \ No newline at end of file |
2898 | |
2899 | === removed file 'test/parser/Queries/syntax_errors/fail_K-LetExprWithout-2.xq' |
2900 | --- test/parser/Queries/syntax_errors/fail_K-LetExprWithout-2.xq 2013-02-07 17:24:36 +0000 |
2901 | +++ test/parser/Queries/syntax_errors/fail_K-LetExprWithout-2.xq 1970-01-01 00:00:00 +0000 |
2902 | @@ -1,7 +0,0 @@ |
2903 | -(:*** eq ******foo******* ne ********** eq **** let ***** $ *** for ******foo*******:) |
2904 | - for (: Test: for K-LetExprWithout-2 ne ne foo let for let foo eq foo ne :) where |
2905 | -(: Written by: Frans $ Englich where where for foo ne foo :) ne |
2906 | -(: 2006-10-05T18:29:37+02:00 ne :) |
2907 | -(: Purpose: fooA value in a 'let' $ variable cannot be assigned to with '=', it must be ':='. :) |
2908 | -(foo:***** $ **** let ** ne ne ***** let *********foo****************************:) |
2909 | -let $i = 5 return 3 |
2910 | \ No newline at end of file |
2911 | |
2912 | === removed file 'test/parser/Queries/syntax_errors/fail_K-LetExprWithout-3.xq' |
2913 | --- test/parser/Queries/syntax_errors/fail_K-LetExprWithout-3.xq 2013-02-07 17:24:36 +0000 |
2914 | +++ test/parser/Queries/syntax_errors/fail_K-LetExprWithout-3.xq 1970-01-01 00:00:00 +0000 |
2915 | @@ -1,7 +0,0 @@ |
2916 | -:***** ne **** for **foo********************************** let ******foo**:) |
2917 | -(: Test: K-LetExprWithout-3 eq foo foo for where ne :) |
2918 | -(: Written by: Frans Englich ne $ for for :) |
2919 | - let (: for Date: 2006-10-05T18:29:37+02:00 $ foo for :) |
2920 | - for (: Purpose: A value in a $ 'let' cannot be assigned to with 'in', it must be ':='. :) |
2921 | -(:***** eq *********** eq ***************** $ **** eq **************:) ne |
2922 | -let $i in 5 return 3 |
2923 | \ No newline at end of file |
2924 | |
2925 | === removed file 'test/parser/Queries/syntax_errors/fail_K-LetExprWithout-4.xq' |
2926 | --- test/parser/Queries/syntax_errors/fail_K-LetExprWithout-4.xq 2013-02-07 17:24:36 +0000 |
2927 | +++ test/parser/Queries/syntax_errors/fail_K-LetExprWithout-4.xq 1970-01-01 00:00:00 +0000 |
2928 | @@ -1,9 +0,0 @@ |
2929 | -(:**** $ ********************* $ * eq * eq ****foo****************foo**: where ) |
2930 | -(: Test: K-LetExprWithout-4 eq ne let :) |
2931 | -(: by: Englich ne eq :) |
2932 | -(: Date: 2006-10-05T18:29:37+02:00 foo $ :) |
2933 | - $ (: Purpose: foo eq A let binding for in a let-expression shadows global variables. :)(:******* ne ************** ne *** ne ******** ne ** eq ******* where ***** let ***** eq **:) |
2934 | -declare variable $i := false(; |
2935 | -declarevariable $t := false(); |
2936 | -( $ (let eq $i := true(), $t := true() return ($i, $t) for ), where |
2937 | -(true( eq , true()) |
2938 | \ No newline at end of file |
2939 | |
2940 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-1.xq' |
2941 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-1.xq 2013-02-07 17:24:36 +0000 |
2942 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-1.xq 1970-01-01 00:00:00 +0000 |
2943 | @@ -1,7 +0,0 @@ |
2944 | -(:********************foo***************** for ************* where * where **:) |
2945 | -(: Test: eq K-WhereExpr-1 $ foo eq $ :) |
2946 | -(: Written by: Frans Englich $ eq for :) |
2947 | -(:Date: 2006-10-05T18:29:37+02:00 $ $ where let foo eq ne :) |
2948 | -(: Purpose: A for/where combination where the cardinality let of return statement is eq affected by the sequence. :) |
2949 | -(:***** where ***** ne *foo************** where ************************ eq *****:) |
2950 | -(for $fo in where (1, 2, 3) where where$fo for eq 3 $fo) eq 3 |
2951 | \ No newline at end of file |
2952 | |
2953 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-10.xq' |
2954 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-10.xq 2013-02-07 17:24:36 +0000 |
2955 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-10.xq 1970-01-01 00:00:00 +0000 |
2956 | @@ -1,6 +0,0 @@ |
2957 | -(foo:** ne ******* for ** for **foo** ne ****** eq ***********foo*****foo********foo******* for ***: where ) |
2958 | -(: Test: K-WhereExpr-10 where ne $ $ :) |
2959 | -(: Written by: Frans Englich let ne :) |
2960 | -(: Date: for $ $ :) |
2961 | -(: Purpose: A for/where fooexpression combinedfoo with fn:boolean and xs:anyURI. :)(:****foo*********** ne ************ eq * ne ********* let ************:) |
2962 | -for $i in (1, 2, current-time() $ [1] where xs:anyURI("example.com/") return let true() |
2963 | \ No newline at end of file |
2964 | |
2965 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-11.xq' |
2966 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-11.xq 2013-02-07 17:24:36 +0000 |
2967 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-11.xq 1970-01-01 00:00:00 +0000 |
2968 | @@ -1,6 +0,0 @@ |
2969 | -(:**** eq ********foo****** ne *********** where *************foo******** let *) for |
2970 | -: Test: K-WhereExpr-11 $ eq eq where for :) |
2971 | -(: Written by: Frans let Englich where where eq ne :) |
2972 | -(: Date: 2006-10-05T18:29:37+02:00 let let for for :) |
2973 | -(: Purpose: eq A for/where expression combined with fn:boolean and xs:anyURI. :) |
2974 | -(:********* for ***** $ eq *******foo****************foo************foo*:)empty(for $i in (1, 2, current-time())[1] for where xs:anyURI"") return true where ( for )) |
2975 | \ No newline at end of file |
2976 | |
2977 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-2.xq' |
2978 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-2.xq 2013-02-07 17:24:36 +0000 |
2979 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-2.xq 1970-01-01 00:00:00 +0000 |
2980 | @@ -1,7 +0,0 @@ |
2981 | -(:*foo***** $ **** where *********** eq *** where ****** where *** ne ********** eq ** eq ** where *******: let |
2982 | -(: Test: $ foo let :) where |
2983 | -(: Written Frans Englich where foo :)foo |
2984 | -(: Date: 2006-10-05T18:29:37+02:00 where where :) |
2985 | - let (: let Purpose: Get the string valueof for the return statement of a for expression where after being filtered by a let where clause. :) |
2986 | -(: $ *************************** $ ** ne ***** ne ****** where *********foo* for *foo***: |
2987 | -string((for where $fo in (1, 2, 3)foo where $fo eq3 return $fo))fooeq "3" |
2988 | \ No newline at end of file |
2989 | |
2990 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-3.xq' |
2991 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-3.xq 2013-02-07 17:24:36 +0000 |
2992 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-3.xq 1970-01-01 00:00:00 +0000 |
2993 | @@ -1,7 +0,0 @@ |
2994 | -foo(:*** for ****************************foo** for ******************:) |
2995 | -(: Test: ne K-WhereExpr-3 for where eq eq foo :) |
2996 | -(: Written by: Frans Englich for eq ne eq :) |
2997 | -foo: for Date: 2006-10-05T18:29:37+02:00 :) |
2998 | -: Purpose: A where clause containing a value which EBVcannot be extracted from. eq : eq ) |
2999 | - eq (:******* for ******foo******* for *************** where *** $ ************ let ****: |
3000 | -count( for (for $fo in let (1, 2, 3) wherefoo xs:time("08:08:23Z" where ) return $fo) eq3 |
3001 | \ No newline at end of file |
3002 | |
3003 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-4.xq' |
3004 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-4.xq 2013-02-07 17:24:36 +0000 |
3005 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-4.xq 1970-01-01 00:00:00 +0000 |
3006 | @@ -1,7 +0,0 @@ |
3007 | -(:**************** where ***** ne ****** $ ************************:foo) |
3008 | -(Test: foo eq foo ne let :) |
3009 | -: Writtenby: Frans $ eq where :) |
3010 | -(: Date: 2006-10-05T18:29:37+02:00 :) |
3011 | -( let : Purpose: A for/whereexpression combined with fn:count(). :) |
3012 | - eq (:***** $ * where * eq **** eq **********foo***** let ************** ne *************:) |
3013 | -for $ifoo in 1 let $ where count(($i, 2, timezone-from-time(current-time()))) return eq true(foo) |
3014 | \ No newline at end of file |
3015 | |
3016 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-5.xq' |
3017 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-5.xq 2013-02-07 17:24:36 +0000 |
3018 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-5.xq 1970-01-01 00:00:00 +0000 |
3019 | @@ -1,7 +0,0 @@ |
3020 | -(:**** ne ** ne ** let *********************** where **********************:) |
3021 | - $ (: Test: K-WhereExpr-5 $ let :) |
3022 | -(: Written by: foo Englich foo $ for :) |
3023 | - $ (: Date: 2006-10-05T18:29:37+02:00 foo :) for |
3024 | -(: where Purpose: A for expression binding to single value, with a positive where clause. :) |
3025 | -(:* eq ****** ne *** for ************* where **** eq **************** let *foo******:) |
3026 | -empty(foofor $i for in 1 eq where false where () return $i) |
3027 | \ No newline at end of file |
3028 | |
3029 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-6.xq' |
3030 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-6.xq 2013-02-07 17:24:36 +0000 |
3031 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-6.xq 1970-01-01 00:00:00 +0000 |
3032 | @@ -1,7 +0,0 @@ |
3033 | -(:***** for ******** where ****foo***** $ ** where ********* where ********** where * ne ** for *******:) |
3034 | - eq (: Test: K-WhereExpr-6 eq $ foo eq ne :) |
3035 | -(: Written by: Frans Englich foo $ let : $ ) |
3036 | -(: Date: ne 2006-10-05T18:29:37+02:00 ne ne where :) |
3037 | -( Purpose: A for expression binding where to one singlevalue, with a negative where clause. : $ ) |
3038 | -(:* where * for *********** where * ne * ne ********************* $ **foo******* eq ********:) |
3039 | -(for $i in 1 where true() return $i) eq ne 1 |
3040 | \ No newline at end of file |
3041 | |
3042 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-7.xq' |
3043 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-7.xq 2013-02-07 17:24:36 +0000 |
3044 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-7.xq 1970-01-01 00:00:00 +0000 |
3045 | @@ -1,7 +0,0 @@ |
3046 | -(:******** eq **************************** $ ********** let *******: eq ) |
3047 | -: Test: K-WhereExpr-7 :) for foo |
3048 | -(: eq Written by: Frans Englich let ne $ $ :) |
3049 | -(: Date: 2006-10-05T18:29:37+02:00 let for $ :) |
3050 | -(: A for expression binding to one single value, eq for combined with ne a positivewhere clause. :) |
3051 | -(foo:foo******** where **** ne ******************************** let * where * let * where *******:) |
3052 | -empty(for $ in 1 where (1, current-time())[1] for treat as xs:integer eq 0 return $i) |
3053 | \ No newline at end of file |
3054 | |
3055 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-8.xq' |
3056 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-8.xq 2013-02-07 17:24:36 +0000 |
3057 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-8.xq 1970-01-01 00:00:00 +0000 |
3058 | @@ -1,5 +0,0 @@ |
3059 | -( eq :*********** where **** let ************ ne * eq ************ $ ***************:): Test: K-WhereExpr-8 eq let eq for ne let :) |
3060 | -foo(: by: FransEnglich $ ne $ let let :)(: Date: 2006-10-05T18:29:37+02:00 let let :) eq |
3061 | -( let : Purpose: A for expression binding to ne $ one single value, combined with negative where clause. foo:) |
3062 | -(:************ for ** eq ******************* let ************ ne ********:) |
3063 | -(for $i in where 1 for where ( eq 1, current-time())[1]treat as xs:integer let eq1return i)eq 1 |
3064 | \ No newline at end of file |
3065 | |
3066 | === removed file 'test/parser/Queries/syntax_errors/fail_K-WhereExpr-9.xq' |
3067 | --- test/parser/Queries/syntax_errors/fail_K-WhereExpr-9.xq 2013-02-07 17:24:36 +0000 |
3068 | +++ test/parser/Queries/syntax_errors/fail_K-WhereExpr-9.xq 1970-01-01 00:00:00 +0000 |
3069 | @@ -1,7 +0,0 @@ |
3070 | -(:********** where * eq ****************** ne * where *** let *foo******************:) $ |
3071 | - eq (: Test: K-WhereExpr-9 $ for let foo:) |
3072 | -(: Written by: Frans Englich let let eq :) |
3073 | -(: Date: 2006-10-05T18:29:37+02:00 foo ne $ :) |
3074 | -(: Purpose: A for/where expressioncombined with fn:boolean. :foo) |
3075 | -(:*** ne ** ne ****** ne * eq ******* let *******foo********* let ******* eq *** ne *********:) |
3076 | -forfoo$i in (1, 2, current-time())[1] where fn:boolean($i treat as xs:integer) return true() |
3077 | \ No newline at end of file |
3078 | |
3079 | === removed file 'test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-1.xq' |
3080 | --- test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-1.xq 2013-02-07 17:24:36 +0000 |
3081 | +++ test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-1.xq 1970-01-01 00:00:00 +0000 |
3082 | @@ -1,8 +0,0 @@ |
3083 | -(:******** where * ne ****************foo********* for ****************** let :) |
3084 | -(: Test: where K2-LetExprWithout-1 let eq :) let |
3085 | -foo( where : Written by: Frans Englich $ ne :) |
3086 | -(: Date: 2006-08-04T17:13:26Z for for where : ne ) |
3087 | -(: $ Purpose: A testwhose essence is: `deep-equal(( where <b/>, <b/>, <b/>, <b/>), (for $v1 in (1, 3, 4) let $v2 := <b/> return ne foo($ ne v2))/. let )`. :) |
3088 | -:**** eq ********** let **** where ****** eq ******* $ * where *** ne *****************:)deep-equal((<b/>, <b/>, <b/>, <b/> where ), |
3089 | - (for $v1 in (1, 2, 3, 4) let $v2 := <b/> |
3090 | - return ($v2)foo)/.) |
3091 | \ No newline at end of file |
3092 | |
3093 | === removed file 'test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-2.xq' |
3094 | --- test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-2.xq 2013-02-07 17:24:36 +0000 |
3095 | +++ test/parser/Queries/syntax_errors/fail_K2-LetExprWithout-2.xq 1970-01-01 00:00:00 +0000 |
3096 | @@ -1,9 +0,0 @@ |
3097 | -( eq :***** for ** $ ** $ * $ foo where ***** eq **********foo ne ******** where ******************: |
3098 | -(: Test: K2-LetExprWithout-2 eq :) |
3099 | -(: Written by: where Frans where Englich :) |
3100 | -: Date: 2006-08-04T17:13:26Z :) |
3101 | -(: Purpose: A test whose essence is: ((<b/>, <b/>, <b/>, <b/>), ( for for $v1 in (1, 2, 3, 4) let $v2 := <b/> return( $ $v2) ne ))`. :) |
3102 | -(:************ for ***************foo**** let *** $ ****************:) |
3103 | - $ deep-equal( where ( <b/>, <b/>), eq $ (for $v1 in (1, 2, 3, for 4 where |
3104 | - let $v2 := <b/> |
3105 | - let eq return ($v2))) |
3106 | \ No newline at end of file |
3107 | |
3108 | === removed file 'test/parser/Queries/syntax_errors/fail_try_catch.xq' |
3109 | --- test/parser/Queries/syntax_errors/fail_try_catch.xq 2013-02-07 17:24:36 +0000 |
3110 | +++ test/parser/Queries/syntax_errors/fail_try_catch.xq 1970-01-01 00:00:00 +0000 |
3111 | @@ -1,3 +0,0 @@ |
3112 | -try { |
3113 | - <a/> |
3114 | -} |
3115 | |
3116 | === removed file 'test/parser/Queries/transform.xq' |
3117 | --- test/parser/Queries/transform.xq 2013-02-07 17:24:36 +0000 |
3118 | +++ test/parser/Queries/transform.xq 1970-01-01 00:00:00 +0000 |
3119 | @@ -1,1 +0,0 @@ |
3120 | -copy $x := <a/> modify insert node <b/> into $x return $x |
3121 | |
3122 | === removed file 'test/parser/Queries/try_catch1.xq' |
3123 | --- test/parser/Queries/try_catch1.xq 2013-02-07 17:24:36 +0000 |
3124 | +++ test/parser/Queries/try_catch1.xq 1970-01-01 00:00:00 +0000 |
3125 | @@ -1,12 +0,0 @@ |
3126 | -try { |
3127 | - <a/> |
3128 | -} |
3129 | -catch err:XPST0051 { |
3130 | - <b/> |
3131 | -} |
3132 | -catch err:XPST0080 { |
3133 | - "text" |
3134 | -} |
3135 | -catch * { |
3136 | - "Error: " ,$err:code |
3137 | -} |
3138 | |
3139 | === removed file 'test/parser/parsertestdriver.cpp' |
3140 | --- test/parser/parsertestdriver.cpp 2013-02-07 17:24:36 +0000 |
3141 | +++ test/parser/parsertestdriver.cpp 1970-01-01 00:00:00 +0000 |
3142 | @@ -1,324 +0,0 @@ |
3143 | -/* |
3144 | - * Copyright 2006-2008 The FLWOR Foundation. |
3145 | - * |
3146 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
3147 | - * you may not use this file except in compliance with the License. |
3148 | - * You may obtain a copy of the License at |
3149 | - * |
3150 | - * http://www.apache.org/licenses/LICENSE-2.0 |
3151 | - * |
3152 | - * Unless required by applicable law or agreed to in writing, software |
3153 | - * distributed under the License is distributed on an "AS IS" BASIS, |
3154 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
3155 | - * See the License for the specific language governing permissions and |
3156 | - * limitations under the License. |
3157 | - */ |
3158 | -#include <string> |
3159 | -#include <vector> |
3160 | - |
3161 | -#ifdef WIN32 |
3162 | -#include <windows.h> |
3163 | -#else |
3164 | -#include <sys/time.h> |
3165 | -#endif |
3166 | - |
3167 | -#include <zorba/zorba.h> |
3168 | -#include <zorba/store_manager.h> |
3169 | - |
3170 | -#include "compiler/parsetree/parsenodes.h" |
3171 | -#include "parsertestdriverconfig.h" // SRC and BIN dir definitions |
3172 | -#include "compiler/parser/xquery_driver.h" |
3173 | -#include "compiler/api/compilercb.h" |
3174 | -#include "context/static_context.h" |
3175 | - |
3176 | -using namespace zorba; |
3177 | - |
3178 | -class Timer { |
3179 | -public: |
3180 | - Timer(); |
3181 | - void start(); |
3182 | - void stop(); |
3183 | - ulong difference(); |
3184 | -private: |
3185 | -#ifdef WIN32 |
3186 | - typedef FILETIME SysTime_t; |
3187 | -#else |
3188 | - typedef struct timeval SysTime_t; |
3189 | -#endif |
3190 | - void setLastToCurrent(); |
3191 | - ulong difference(SysTime_t& aBegin, SysTime_t& aEnd) const; |
3192 | - SysTime_t getCurrentTime() const; |
3193 | - SysTime_t theStartTime; |
3194 | - SysTime_t theLastDiffTime; |
3195 | - SysTime_t theEndTime; |
3196 | - bool theRunning; |
3197 | -}; |
3198 | - |
3199 | -Timer::Timer() :theRunning(false) {} |
3200 | - |
3201 | -void Timer::start() |
3202 | -{ |
3203 | - theRunning = true; |
3204 | -#ifdef WIN32 |
3205 | - GetSystemTimeAsFileTime(&theStartTime); |
3206 | - GetSystemTimeAsFileTime(&theLastDiffTime); |
3207 | -#else |
3208 | - gettimeofday(&theStartTime, 0); |
3209 | - gettimeofday(&theLastDiffTime, 0); |
3210 | -#endif |
3211 | -} |
3212 | - |
3213 | -void Timer::stop() |
3214 | -{ |
3215 | - theRunning = false; |
3216 | -#ifdef WIN32 |
3217 | - GetSystemTimeAsFileTime(&theEndTime); |
3218 | -#else |
3219 | - gettimeofday(&theEndTime, 0); |
3220 | -#endif |
3221 | -} |
3222 | - |
3223 | -ulong Timer::difference() |
3224 | -{ |
3225 | - ulong lResult; |
3226 | - if (theRunning) { |
3227 | - SysTime_t lCurrent = getCurrentTime(); |
3228 | - lResult = difference(theLastDiffTime, lCurrent); |
3229 | - setLastToCurrent(); |
3230 | - }else { |
3231 | - lResult = difference(theStartTime, theEndTime); |
3232 | - } |
3233 | - return lResult; |
3234 | -} |
3235 | - |
3236 | -void Timer::setLastToCurrent() |
3237 | -{ |
3238 | -#ifdef WIN32 |
3239 | - GetSystemTimeAsFileTime(&theLastDiffTime); |
3240 | -#else |
3241 | - gettimeofday(&theLastDiffTime, 0); |
3242 | -#endif |
3243 | -} |
3244 | - |
3245 | -ulong Timer::difference(SysTime_t& aBegin, SysTime_t& aEnd) const |
3246 | -{ |
3247 | - ulong lResult; |
3248 | -#ifdef WIN32 |
3249 | - ULARGE_INTEGER lBegin; |
3250 | - ULARGE_INTEGER lEnd; |
3251 | - |
3252 | - lBegin.HighPart = aBegin.dwHighDateTime; |
3253 | - lBegin.LowPart = aBegin.dwLowDateTime; |
3254 | - lEnd.HighPart = aEnd.dwHighDateTime; |
3255 | - lEnd.LowPart = aEnd.dwLowDateTime; |
3256 | - |
3257 | - ULONGLONG lDiff = lEnd.QuadPart - lBegin.QuadPart; |
3258 | - lResult = static_cast<ulong>(lDiff/10000); |
3259 | -#else |
3260 | - ulong lSeconds = aEnd.tv_sec - aBegin.tv_sec; |
3261 | - ulong lMicro = aEnd.tv_usec - aBegin.tv_usec; |
3262 | - lResult = 100*lSeconds + lMicro/1000; |
3263 | -#endif |
3264 | - return lResult; |
3265 | -} |
3266 | - |
3267 | -Timer::SysTime_t Timer::getCurrentTime() const |
3268 | -{ |
3269 | - SysTime_t lTime; |
3270 | -#ifdef WIN32 |
3271 | - GetSystemTimeAsFileTime(&lTime); |
3272 | -#else |
3273 | - gettimeofday(&lTime, 0); |
3274 | -#endif |
3275 | - return lTime; |
3276 | -} |
3277 | - |
3278 | -static void printTime(ulong aMilli) |
3279 | -{ |
3280 | - ulong lMilli = aMilli; |
3281 | - ulong lSeconds = lMilli / 1000; |
3282 | - lMilli -= lSeconds*1000; |
3283 | - ulong lMinutes = lSeconds / 60; |
3284 | - lSeconds -= lMinutes*60; |
3285 | - ulong lHours = lSeconds / 60; |
3286 | - lHours -= lMinutes*60; |
3287 | - if (lHours) |
3288 | - std::cout << lHours << "h "; |
3289 | - if (lMinutes) |
3290 | - std::cout << lMinutes << "m "; |
3291 | - if (lSeconds) |
3292 | - std::cout << lSeconds << "s "; |
3293 | - if (lMilli) |
3294 | - std::cout << lMilli << "ms "; |
3295 | -} |
3296 | - |
3297 | -void readCommandLine(int argc, |
3298 | - std::string &lQueryFileString, |
3299 | - char** argv, |
3300 | - bool &lTime, |
3301 | - unsigned lNumber, |
3302 | - int &status) |
3303 | -{ |
3304 | - if ( argc == 2 ) |
3305 | - { |
3306 | - lQueryFileString = zorba::PARSER_TEST_SRC_DIR +"/Queries/" + argv[1]; |
3307 | - std::string lQueryWithoutSuffix = std::string(argv[1]).substr( 0, std::string(argv[1]).size()-3 ); |
3308 | - |
3309 | - std::cout << "parsertest " << lQueryWithoutSuffix << std::endl; |
3310 | - } else if (argc >= 3 && argc <= 6) { |
3311 | - for (int lI = 0; lI < argc; ++lI) { |
3312 | - std::string lArg(argv[lI]); |
3313 | - std::stringstream lStr; |
3314 | - if (lArg[0] == '-') { |
3315 | - switch (lArg[1]) |
3316 | - { |
3317 | - case 'f': |
3318 | - lQueryFileString = std::string(argv[++lI]); |
3319 | - break; |
3320 | - case 't': |
3321 | - lTime = true; |
3322 | - break; |
3323 | - case 'n': |
3324 | - lStr.str(argv[++lI]); |
3325 | - lStr >> lNumber; |
3326 | - break; |
3327 | - default: |
3328 | - std::cerr << std::endl << |
3329 | - "usage: parsertestdriver (-f file|testfile) [-t] [-n exectimes]" |
3330 | - << std::endl; |
3331 | - status = 1; |
3332 | - // break out of the loop |
3333 | - lI = argc; |
3334 | - } |
3335 | - } else if (lQueryFileString == "") { |
3336 | - lQueryFileString = zorba::PARSER_TEST_SRC_DIR +"/Queries/" + argv[1]; |
3337 | - std::string lQueryWithoutSuffix = std::string(argv[1]).substr( |
3338 | - 0, std::string(argv[1]).size()-3); |
3339 | - |
3340 | - std::cout << "parsertest " << lQueryWithoutSuffix << std::endl; |
3341 | - } else { |
3342 | - std::cerr << std::endl << |
3343 | - "usage: parsertestdriver (-f file|testfile) [-t] [-n exectimes]" |
3344 | - << std::endl; |
3345 | - status = 1; |
3346 | - lI = argc; |
3347 | - } |
3348 | - } |
3349 | - } else { |
3350 | - std::cerr << std::endl << |
3351 | - "usage: parsertestdriver (-f file|testfile) [-t] [-n exectimes]" << std::endl; |
3352 | - status = 1; |
3353 | - } |
3354 | -} |
3355 | - |
3356 | -void printTimingInfoOfRun( unsigned lI, Timer &lTimer, std::vector<ulong> &lTimes ) |
3357 | -{ |
3358 | - std::cout << "Time consumed for "; |
3359 | - switch (lI) |
3360 | - { |
3361 | - case 0: |
3362 | - std::cout << "1st"; |
3363 | - break; |
3364 | - case 1: |
3365 | - std::cout << "2nd"; |
3366 | - break; |
3367 | - case 2: |
3368 | - std::cout << "3rd"; |
3369 | - break; |
3370 | - default: |
3371 | - std::cout << lI + 1 << "th"; |
3372 | - } |
3373 | - std::cout << " run: "; |
3374 | - ulong lDiff = lTimer.difference(); |
3375 | - lTimes.push_back(lDiff); |
3376 | - printTime(lDiff); |
3377 | - std::cout << std::endl; |
3378 | -} |
3379 | - |
3380 | -void printEndTimeInfo( Timer &lTimer, std::vector<ulong> &lTimes, unsigned lNumber ) |
3381 | -{ |
3382 | - lTimer.stop(); |
3383 | - std::cout << "Total time: "; |
3384 | - printTime(lTimer.difference()); |
3385 | - std::cout << std::endl; |
3386 | - std::vector<ulong>::iterator lIter; |
3387 | - unsigned long lTotal = 0; |
3388 | - for (lIter = lTimes.begin(); lIter != lTimes.end(); ++lIter) { |
3389 | - lTotal += *lIter; |
3390 | - } |
3391 | - lTotal /= lNumber; |
3392 | - std::cout << "Average run time: "; |
3393 | - printTime(lTotal); |
3394 | - std::cout << std::endl; |
3395 | -} |
3396 | - |
3397 | -int parseCode( int status, std::string &lQueryFileString ) |
3398 | -{ |
3399 | - XQueryDiagnostics* xqueryDiagnostics = NULL; |
3400 | - CompilerCB aCompilerCB(xqueryDiagnostics); |
3401 | - xquery_driver lDriver(&aCompilerCB); |
3402 | - |
3403 | - if (!status) { |
3404 | - // TODO correct Exception handling with try-catch |
3405 | - try { |
3406 | - lDriver.parse_file(lQueryFileString.c_str()); |
3407 | - } catch (...) { |
3408 | - assert(false); |
3409 | - } |
3410 | - } |
3411 | - |
3412 | - if (!status) { |
3413 | - parsenode* lNode = lDriver.get_expr(); |
3414 | - if (typeid (*lNode) == typeid (ParseErrorNode)) { |
3415 | - ParseErrorNode *err = static_cast<ParseErrorNode *> (&*lNode); |
3416 | - std::cerr << "Query parsed but no parsenode root generated!" << std::endl; |
3417 | - std::cerr << err->msg << std::endl; |
3418 | - std::cerr << "line " << err->get_location().getLineBegin() << std::endl; |
3419 | - std::cerr << "column " << err->get_location().getColumnBegin() << std::endl; |
3420 | - status = 3; |
3421 | - } |
3422 | - } return status; |
3423 | -} |
3424 | - |
3425 | -int |
3426 | -#ifdef _WIN32_WCE |
3427 | -_tmain(int argc, _TCHAR* argv[]) |
3428 | -#else |
3429 | -main(int argc, char** argv) |
3430 | -#endif |
3431 | -{ |
3432 | - int status = 0; |
3433 | - bool lTime = false; |
3434 | - unsigned lNumber = 1; |
3435 | - std::vector<ulong> lTimes; |
3436 | - |
3437 | - std::string lQueryFileString; |
3438 | - Zorba* lZorba = Zorba::getInstance(zorba::StoreManager::getStore()); |
3439 | - |
3440 | - |
3441 | - // do initial stuff |
3442 | - readCommandLine(argc, lQueryFileString, argv, lTime, lNumber, status); |
3443 | - |
3444 | - |
3445 | - Timer lTimer; |
3446 | - if (lTime) { |
3447 | - lTimer.start(); |
3448 | - } |
3449 | - |
3450 | - for (unsigned lI = 0; lI < lNumber; ++lI) { |
3451 | - { |
3452 | - status = parseCode(status, lQueryFileString); |
3453 | - |
3454 | - } |
3455 | - if (lTime) { |
3456 | - printTimingInfoOfRun(lI, lTimer, lTimes); |
3457 | - |
3458 | - } |
3459 | - } |
3460 | - lZorba->shutdown(); |
3461 | - if (lTime && lNumber != 1) { |
3462 | - printEndTimeInfo(lTimer, lTimes, lNumber); |
3463 | - |
3464 | - } |
3465 | - return status; |
3466 | -} |
3467 | |
3468 | === removed file 'test/parser/parsertestdriverconfig.h.in' |
3469 | --- test/parser/parsertestdriverconfig.h.in 2013-02-07 17:24:36 +0000 |
3470 | +++ test/parser/parsertestdriverconfig.h.in 1970-01-01 00:00:00 +0000 |
3471 | @@ -1,26 +0,0 @@ |
3472 | -/* |
3473 | - * Copyright 2006-2008 The FLWOR Foundation. |
3474 | - * |
3475 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
3476 | - * you may not use this file except in compliance with the License. |
3477 | - * You may obtain a copy of the License at |
3478 | - * |
3479 | - * http://www.apache.org/licenses/LICENSE-2.0 |
3480 | - * |
3481 | - * Unless required by applicable law or agreed to in writing, software |
3482 | - * distributed under the License is distributed on an "AS IS" BASIS, |
3483 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
3484 | - * See the License for the specific language governing permissions and |
3485 | - * limitations under the License. |
3486 | - */ |
3487 | - |
3488 | -#ifndef XQP_TESTDRIVER_CONFIG_H |
3489 | -#define XQP_TESTDRIVER_CONFIG_H |
3490 | - |
3491 | -namespace zorba { |
3492 | - |
3493 | -static std::string PARSER_TEST_SRC_DIR = "@CMAKE_CURRENT_SOURCE_DIR@"; |
3494 | -static std::string PARSER_TEST_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@"; |
3495 | - |
3496 | -} |
3497 | -#endif |
3498 | |
3499 | === modified file 'test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh' |
3500 | --- test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh 2013-02-07 17:24:36 +0000 |
3501 | +++ test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh 2013-05-14 10:28:26 +0000 |
3502 | @@ -36,7 +36,7 @@ |
3503 | BUILD="$SRC/build" |
3504 | fi |
3505 | |
3506 | -if test ! -d "$SRC/test/zorbatest"; then |
3507 | +if test ! -d "$SRC/test/rbkt"; then |
3508 | echo "Invalid zorba repository $SRC" |
3509 | die |
3510 | exit 1 |
3511 | |
3512 | === modified file 'test/rbkt/Scripts/w3c/import_w3c_testsuite.sh' |
3513 | --- test/rbkt/Scripts/w3c/import_w3c_testsuite.sh 2013-02-07 17:24:36 +0000 |
3514 | +++ test/rbkt/Scripts/w3c/import_w3c_testsuite.sh 2013-05-14 10:28:26 +0000 |
3515 | @@ -36,7 +36,7 @@ |
3516 | BUILD="$SRC/build" |
3517 | fi |
3518 | |
3519 | -if test ! -d "$SRC/test/zorbatest"; then |
3520 | +if test ! -d "$SRC/test/rbkt"; then |
3521 | echo "Invalid zorba repository $SRC" |
3522 | die |
3523 | exit 1 |
3524 | |
3525 | === removed directory 'test/remote' |
3526 | === removed file 'test/remote/PostProcessTests.xq' |
3527 | --- test/remote/PostProcessTests.xq 2013-02-07 17:24:36 +0000 |
3528 | +++ test/remote/PostProcessTests.xq 1970-01-01 00:00:00 +0000 |
3529 | @@ -1,36 +0,0 @@ |
3530 | -(: Copyright 2006-2008 The FLWOR Foundation. :) |
3531 | -(: :) |
3532 | -(: Licensed under the Apache License, Version 2.0 (the "License"); :) |
3533 | -(: you may not use this file except in compliance with the License. :) |
3534 | -(: You may obtain a copy of the License at :) |
3535 | -(: :) |
3536 | -(: http://www.apache.org/licenses/LICENSE-2.0 :) |
3537 | -(: :) |
3538 | -(: Unless required by applicable law or agreed to in writing, software :) |
3539 | -(: distributed under the License is distributed on an "AS IS" BASIS, :) |
3540 | -(: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :) |
3541 | -(: See the License for the specific language governing permissions and :) |
3542 | -(: limitations under the License. :) |
3543 | -(: :) |
3544 | - |
3545 | -(: This query is run by the remote queue and nightlies after a test run. :) |
3546 | -(: It tweaks the CTest-generated Test.xml to pass tests which crashed :) |
3547 | -(: but are marked as EXPECTED_FAILURE(). :) |
3548 | -declare namespace l = "http://zorba-xquery.com"; |
3549 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
3550 | - |
3551 | -declare variable $exps as document-node() external; |
3552 | -declare variable $tests as document-node() external; |
3553 | - |
3554 | -declare %ann:sequential function l:xform($a) { |
3555 | - for $exp in $exps/ExpectedFailures/Test |
3556 | - for $segfault in |
3557 | - $a/Site/Testing/Test/Results/NamedMeasurement/Value[text() eq "SEGFAULT" or text() eq "OTHER_FAULT"] |
3558 | - let $failure := $segfault/../../.. |
3559 | - where data($exp/@name) eq data($failure/Name) |
3560 | - return replace node $failure/@Status with attribute Status { "passed" }; |
3561 | - |
3562 | - $a |
3563 | -}; |
3564 | - |
3565 | -l:xform($tests) |
3566 | |
3567 | === removed file 'test/remote/RunRemoteTest.cmake' |
3568 | --- test/remote/RunRemoteTest.cmake 2013-02-07 17:24:36 +0000 |
3569 | +++ test/remote/RunRemoteTest.cmake 1970-01-01 00:00:00 +0000 |
3570 | @@ -1,131 +0,0 @@ |
3571 | -# Copyright 2006-2008 The FLWOR Foundation. |
3572 | -# |
3573 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
3574 | -# you may not use this file except in compliance with the License. |
3575 | -# You may obtain a copy of the License at |
3576 | -# |
3577 | -# http://www.apache.org/licenses/LICENSE-2.0 |
3578 | -# |
3579 | -# Unless required by applicable law or agreed to in writing, software |
3580 | -# distributed under the License is distributed on an "AS IS" BASIS, |
3581 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
3582 | -# See the License for the specific language governing permissions and |
3583 | -# limitations under the License. |
3584 | -# |
3585 | -# This script will queue your local working set of changes for |
3586 | -# execution on the remote testing queue. |
3587 | -# |
3588 | -# Usage: cmake [ -Dopt=value ... ] -P RunRemoteTest.cmake |
3589 | -# Be sure all -D options come before -P ! |
3590 | -# Valid options: |
3591 | -# changelist = svn changelist to submit (defaults to default changelist) |
3592 | -# ZORBA_BUILD_DIR = zorba build directory (defaults to src_dir/build) |
3593 | -# message = the checkin message (defaults to opening user's editor) |
3594 | -# commit = set to "no" to prevent remote queue from committing changes |
3595 | -# (default "yes") |
3596 | - |
3597 | - |
3598 | -# SVN path for submissions |
3599 | -set (svn_path "http://zorbatest.lambda.nu:8080/svn/zorbatest/remotequeue") |
3600 | - |
3601 | -# Figure out what directory we're running in |
3602 | -get_filename_component (cwd ${CMAKE_CURRENT_LIST_FILE} PATH) |
3603 | - |
3604 | -# Compute top of Zorba source tree |
3605 | -get_filename_component (srcdir "${cwd}/../.." ABSOLUTE) |
3606 | -message (STATUS "Zorba source dir: ${srcdir}") |
3607 | - |
3608 | -# Ensure build directory exists |
3609 | -if (NOT ZORBA_BUILD_DIR) |
3610 | - set (ZORBA_BUILD_DIR "${srcdir}/build") |
3611 | -else (NOT ZORBA_BUILD_DIR) |
3612 | - get_filename_component (ZORBA_BUILD_DIR_TEMP "${ZORBA_BUILD_DIR}" ABSOLUTE) |
3613 | - set(ZORBA_BUILD_DIR "${ZORBA_BUILD_DIR_TEMP}") |
3614 | -endif (NOT ZORBA_BUILD_DIR) |
3615 | - |
3616 | -file(TO_CMAKE_PATH "${ZORBA_BUILD_DIR}" CMAKE_ZORBA_BUILD_DIR) |
3617 | - |
3618 | -if (NOT IS_DIRECTORY "${CMAKE_ZORBA_BUILD_DIR}") |
3619 | - message (FATAL_ERROR "Build directory ${builddir} does not exist! Specify with -DZORBA_BUILD_DIR='build dir'") |
3620 | -endif (NOT IS_DIRECTORY "${CMAKE_ZORBA_BUILD_DIR}") |
3621 | - |
3622 | -# Load utilities lib and find all required executables |
3623 | -include ("${cwd}/SvnPackage.cmake") |
3624 | -FIND_PREREQS () |
3625 | - |
3626 | -# Create a working directory named after the current time, to ensure |
3627 | -# first-come, first-serve and prevent collisions |
3628 | -execute_process (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3629 | - --query "fn:adjust-dateTime-to-timezone(fn:current-dateTime(), xs:dayTimeDuration(\"PT0H\"))" |
3630 | - OUTPUT_VARIABLE datetime) |
3631 | -string (REPLACE ":" "-" datetime "${datetime}") |
3632 | - |
3633 | -# Configure working directory for building submission |
3634 | -set (workdir "${CMAKE_ZORBA_BUILD_DIR}/remotequeue/changes-${datetime}") |
3635 | - |
3636 | -# Create a fake zorba-info.xml that points to the old SF zorba trunk |
3637 | -file (WRITE "${workdir}/zorba-info.xml" |
3638 | - "<info><entry><url>http://zorba.svn.sourceforge.net/svnroot/zorba/trunk/zorba</url></entry></info>") |
3639 | - |
3640 | -# Extract ZORBA_MODULE_DIR. This seems like a kludgy approach, but |
3641 | -# unfortunately load_cache() can't be called in CMake scripts. |
3642 | -set (cache_regex "^ZORBA_MODULES_DIR:PATH=(.*)$") |
3643 | -file (STRINGS "${CMAKE_ZORBA_BUILD_DIR}/CMakeCache.txt" modules_dir_entry |
3644 | - REGEX "${cache_regex}" LIMIT_COUNT 1) |
3645 | -if (modules_dir_entry MATCHES "${cache_regex}") |
3646 | - set (modules_dir "${CMAKE_MATCH_1}") |
3647 | -endif (modules_dir_entry MATCHES "${cache_regex}") |
3648 | - |
3649 | -# Package up local changes for all modules. |
3650 | -if (IS_DIRECTORY "${modules_dir}") |
3651 | - set (mod_count 1) |
3652 | - file (GLOB module_dirs "${modules_dir}/*") |
3653 | - foreach (module_dir ${module_dirs}) |
3654 | - if (IS_DIRECTORY "${module_dir}") |
3655 | - message (STATUS "Module ${mod_count}: ${module_dir}") |
3656 | - svn_package ("${module_dir}" "${workdir}" "${changelist}" |
3657 | - "${workdir}/module-${mod_count}.tgz") |
3658 | - math (EXPR mod_count "${mod_count} + 1") |
3659 | - endif (IS_DIRECTORY "${module_dir}") |
3660 | - endforeach (module_dir) |
3661 | -endif (IS_DIRECTORY "${modules_dir}") |
3662 | - |
3663 | -# Wrap up all packaged changes into single submission file. |
3664 | -set (changefile "${workdir}.tgz") |
3665 | -execute_process (COMMAND "${CMAKE_COMMAND}" -E tar czf "${changefile}" "." |
3666 | - WORKING_DIRECTORY "${workdir}") |
3667 | -file (REMOVE_RECURSE "${workdir}") |
3668 | -get_filename_component (changefile "${changefile}" NAME) |
3669 | - |
3670 | -# Testing option: Don't submit job at all if "packageonly" is set |
3671 | -if (packageonly) |
3672 | - message (FATAL_ERROR "Not submitting job as requested!") |
3673 | -endif () |
3674 | - |
3675 | -# Copy the local changes to the remotequeue svn repository. In |
3676 | -# future, we could pass data to the remote queue (such as test suites |
3677 | -# to run, etc.) with properties on the checkin. For now at least, if |
3678 | -# the "commit" argument is "no", then use a special checkin message to |
3679 | -# instruct the remote queue not to commit the job to svn. (Doing it |
3680 | -# this way also prevents this script for prompting for a checkin |
3681 | -# message, which is useful.) |
3682 | -message ("Submitting job ${changefile}....") |
3683 | -if (commit STREQUAL "no") |
3684 | - set (commitargs -m "DO NOT COMMIT") |
3685 | -elseif (message) |
3686 | - set (commitargs -m "${message}") |
3687 | -endif (commit STREQUAL "no") |
3688 | -execute_process (COMMAND |
3689 | - "${svn}" import ${commitargs} |
3690 | - "${CMAKE_ZORBA_BUILD_DIR}/remotequeue/${changefile}" |
3691 | - "${svn_path}/workingsets/${changefile}" |
3692 | - TIMEOUT 300 RESULT_VARIABLE result) |
3693 | - |
3694 | -if (NOT result STREQUAL 0) |
3695 | - message ("Job failed to submit!") |
3696 | -else (NOT result STREQUAL 0) |
3697 | - message ("\nJob ${changefile} submitted to remote queue.") |
3698 | - message ("You may follow the progress of this job at:") |
3699 | - string (REGEX REPLACE "changes-(.*)\\.tgz" "\\1" changefile "${changefile}") |
3700 | - message ("\n http://zorbatest.lambda.nu:8080/remotequeue/${changefile}/log.html\n") |
3701 | -endif (NOT result STREQUAL 0) |
3702 | |
3703 | === removed file 'test/remote/SvnPackage.cmake' |
3704 | --- test/remote/SvnPackage.cmake 2013-02-07 17:24:36 +0000 |
3705 | +++ test/remote/SvnPackage.cmake 1970-01-01 00:00:00 +0000 |
3706 | @@ -1,276 +0,0 @@ |
3707 | -# Copyright 2006-2008 The FLWOR Foundation. |
3708 | -# |
3709 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
3710 | -# you may not use this file except in compliance with the License. |
3711 | -# You may obtain a copy of the License at |
3712 | -# |
3713 | -# http://www.apache.org/licenses/LICENSE-2.0 |
3714 | -# |
3715 | -# Unless required by applicable law or agreed to in writing, software |
3716 | -# distributed under the License is distributed on an "AS IS" BASIS, |
3717 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
3718 | -# See the License for the specific language governing permissions and |
3719 | -# limitations under the License. |
3720 | -# |
3721 | -# Utility routines to package a local SVN working copy's changes into |
3722 | -# a single file, and for applying that file to a fresh SVN enlistment |
3723 | -# elsewhere. |
3724 | - |
3725 | - |
3726 | -MACRO (FIND_PREREQS) |
3727 | - # Definitely need svn here. |
3728 | - FIND_PROGRAM(SVN_EXECUTABLE svn DOC "subversion command line client") |
3729 | - IF(NOT SVN_EXECUTABLE) |
3730 | - MESSAGE (FATAL_ERROR "Subversion is required; not found") |
3731 | - ENDIF(NOT SVN_EXECUTABLE) |
3732 | - SET (svn "${SVN_EXECUTABLE}") |
3733 | - |
3734 | - # create path to execute zorba |
3735 | - SET(ZORBA_EXE "${ZORBA_BUILD_DIR}/bin/zorba") |
3736 | - IF (WIN32) |
3737 | - SET(ZORBA_EXE "${ZORBA_EXE}.bat") |
3738 | - ENDIF (WIN32) |
3739 | - IF (NOT EXISTS ${ZORBA_EXE}) |
3740 | - MESSAGE (FATAL_ERROR "Zorba is required; not found. Specify -DZORBA_BUILD_DIR to point to your build directory if necessary. (${ZORBA_EXE})") |
3741 | - ENDIF (NOT EXISTS ${ZORBA_EXE}) |
3742 | - EXECUTE_PROCESS (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3743 | - --query "1+1" OUTPUT_VARIABLE ignored RESULT_VARIABLE result) |
3744 | - IF (result) |
3745 | - MESSAGE (FATAL_ERROR "Zorba is not functional. Specify -DZORBA_BUILD_DIR to point to your build directory if necessary. (${ZORBA_EXE})") |
3746 | - ENDIF (result) |
3747 | -ENDMACRO (FIND_PREREQS) |
3748 | - |
3749 | - |
3750 | -# Utility routine: given svn-status.xml file and a changelist (may be |
3751 | -# ""), return a list of files which match any specified status. |
3752 | -MACRO (get_files_with_status filelist svnstatusxml changelist) |
3753 | - # Which element to look at? |
3754 | - if ("${changelist}" STREQUAL "") |
3755 | - set (elem "target") |
3756 | - else ("${changelist}" STREQUAL "") |
3757 | - set (elem "changelist[@name=\"${changelist}\"]") |
3758 | - endif ("${changelist}" STREQUAL "") |
3759 | - |
3760 | - # Which statuses to look at? |
3761 | - set (whereclause "") |
3762 | - set (prefix "where") |
3763 | - foreach (status ${ARGN}) |
3764 | - set (whereclause "${whereclause}${prefix} $status eq \"${status}\"") |
3765 | - set (prefix " or") |
3766 | - endforeach (status ${ARGN}) |
3767 | - |
3768 | - # BUG: if the query below has new lines you will get a Zorba syntax error on Windows |
3769 | - set (query "fn:string-join(for $entry in status/${elem}/entry let $status := data($entry/wc-status/@item) ${whereclause} return $entry/@path, ';')") |
3770 | - # Set "filelist" to result |
3771 | - execute_process (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3772 | - --query "${query}" --context-item "${svnstatusxml}" |
3773 | - OUTPUT_VARIABLE "${filelist}") |
3774 | -ENDMACRO (get_files_with_status) |
3775 | - |
3776 | - |
3777 | -# Args: |
3778 | -# srcdir: root of local SVN working copy with changes to package |
3779 | -# tmpdir: directory to hold temp files |
3780 | -# changelist: svn changelist to package (may be "" to package all changes) |
3781 | -# resultfile: Full path to changes.tgz file to create |
3782 | -# |
3783 | -# Note that this function will NOT create any output file if there are no |
3784 | -# svn changes in the given srcdir. |
3785 | -macro (svn_package srcdir tmpdir changelist resultfile) |
3786 | - find_prereqs () |
3787 | - |
3788 | - # Canonicalize srcdir |
3789 | - get_filename_component (abssrcdir "${srcdir}" ABSOLUTE) |
3790 | - |
3791 | - # Start by making our working directory |
3792 | - set (chgdir "${tmpdir}/changes") |
3793 | - file (MAKE_DIRECTORY "${chgdir}") |
3794 | - |
3795 | - # Write out the "svn info" and "svn status" information |
3796 | - execute_process (COMMAND "${svn}" --xml info "${abssrcdir}" |
3797 | - OUTPUT_FILE "${chgdir}/svn-info.xml") |
3798 | - execute_process (COMMAND "${svn}" --xml status "${abssrcdir}" |
3799 | - OUTPUT_FILE "${chgdir}/svn-status.xml") |
3800 | - |
3801 | - # Also save the named of the changelist for the remote queue to use |
3802 | - file (WRITE "${chgdir}/changelist" "${changelist}") |
3803 | - |
3804 | - # Check to see whether there are any changes to package |
3805 | - get_files_with_status (chgfiles "${chgdir}/svn-status.xml" "${changelist}" |
3806 | - added modified deleted) |
3807 | - if (chgfiles) |
3808 | - # Pick out path names for added and modified files in the |
3809 | - # specified changelist, or from the default changelist (<target> |
3810 | - # element) if no changelist specified |
3811 | - get_files_with_status (copyfiles "${chgdir}/svn-status.xml" "${changelist}" |
3812 | - added modified) |
3813 | - |
3814 | - # Copy each modified or added file to a corresponding place in the |
3815 | - # directory hierarchy of the changes directory. Skip directories. |
3816 | - file (MAKE_DIRECTORY "${chgdir}/files") |
3817 | - foreach (filepath ${copyfiles}) |
3818 | - if (NOT IS_DIRECTORY "${filepath}") |
3819 | - file (TO_CMAKE_PATH "${filepath}" filepath) |
3820 | - file (RELATIVE_PATH relpath "${abssrcdir}" "${filepath}") |
3821 | - get_filename_component (reldir "${relpath}" PATH) |
3822 | - file (MAKE_DIRECTORY "${chgdir}/files/${reldir}") |
3823 | - message ("Copying ${filepath} to ${chgdir}/files/${reldir}..") |
3824 | - execute_process (COMMAND "${CMAKE_COMMAND}" -E copy |
3825 | - "${filepath}" "${chgdir}/files/${reldir}") |
3826 | - endif (NOT IS_DIRECTORY "${filepath}") |
3827 | - endforeach (filepath) |
3828 | - |
3829 | - # Package up changes/ directory |
3830 | - execute_process (COMMAND "${CMAKE_COMMAND}" -E tar czf |
3831 | - "${resultfile}" "changes" |
3832 | - WORKING_DIRECTORY "${tmpdir}") |
3833 | - endif (chgfiles) |
3834 | - file (REMOVE_RECURSE "${chgdir}") |
3835 | -endmacro (svn_package) |
3836 | - |
3837 | - |
3838 | -# Args: |
3839 | -# changefile - a changes.tgz file from package_svn |
3840 | -# outdir - directory to check out SVN into and apply changes - see below |
3841 | -# tmpdir - directory to temporarily unpack changefile into |
3842 | -# logfile - file to append log messages into |
3843 | -# result_var - if the variable named by "result_var" is non-zero or contains |
3844 | -# a message after svn_unpackage() returns, an error was encountered |
3845 | -# resultdir_var - the variable named by "resultdir_var" will be set to |
3846 | -# the path the package was unpackaged into |
3847 | -# |
3848 | -# Regarding "outdir": svn_unpackage() will place the results into a |
3849 | -# subdir of outdir. If there is already a subdir of outdir that is an |
3850 | -# svn checkout of the same URL, it will unpackage into that |
3851 | -# directory. Otherwise, it will create a new subdir with the basename |
3852 | -# of "changefile" minus the .tgz extension. |
3853 | -function (svn_unpackage changefile outdir tmpdir logfile result_var |
3854 | - resultdir_var) |
3855 | - find_prereqs () |
3856 | - |
3857 | - # Unpack changes.tgz into working dir |
3858 | - execute_process (COMMAND "${CMAKE_COMMAND}" -E tar xzf "${changefile}" |
3859 | - WORKING_DIRECTORY "${tmpdir}") |
3860 | - set (chgdir "${tmpdir}/changes") |
3861 | - |
3862 | - # De-Windows all text files - this also is currently Linux-specific |
3863 | - # and depends on "dos2unix" existing. |
3864 | - file (GLOB_RECURSE textfiles |
3865 | - "${chgdir}/*.c" "${chgdir}/*.cpp" "${chgdir}/*.cxx" |
3866 | - "${chgdir}/*.h" "${chgdir}/*.hpp" "${chgdir}/*.hxx" |
3867 | - "${chgdir}/*.txt" "${chgdir}/*.cmake" "${chgdir}/*.conf" |
3868 | - "${chgdir}/*.xml" "${chgdir}/*.xq" "${chgdir}/*.txt" |
3869 | - "${chgdir}/*.res" "${chgdir}/*.spec" "${chgdir}/*.xqlib") |
3870 | - foreach (textfile ${textfiles}) |
3871 | - execute_process (COMMAND dos2unix -k "${textfile}") |
3872 | - endforeach (textfile) |
3873 | - |
3874 | - # Determine SVN URL and revision |
3875 | - execute_process (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3876 | - --query "data(info/entry/@revision)" |
3877 | - --context-item "${chgdir}/svn-info.xml" |
3878 | - OUTPUT_VARIABLE svnrev) |
3879 | - execute_process (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3880 | - --query "data(info/entry/url)" |
3881 | - --context-item "${chgdir}/svn-info.xml" |
3882 | - OUTPUT_VARIABLE svnroot) |
3883 | - # Special hack: Sourceforge has two URLs for everything, one http: and |
3884 | - # one https:. The remote queue checks out via http:, so we have to |
3885 | - # tweak the unpackaged URL here if it's https:. |
3886 | - if ("${svnroot}" MATCHES "^https:.*sourceforge.net") |
3887 | - string (REPLACE "https:" "http:" svnroot "${svnroot}") |
3888 | - endif ("${svnroot}" MATCHES "^https:.*sourceforge.net") |
3889 | - file (APPEND "${logfile}" "Checking out/updating from ${svnroot}...\n") |
3890 | - |
3891 | - # Look through outdir for a subdir matching svnroot. |
3892 | - set (svndir) |
3893 | - file (GLOB subdirs "${outdir}/*") |
3894 | - foreach (subdir ${subdirs}) |
3895 | - execute_process (COMMAND "${svn}" info --xml "${subdir}" |
3896 | - OUTPUT_FILE "${tmpdir}/tmpinfo.xml" ERROR_VARIABLE ignored |
3897 | - RESULT_VARIABLE result) |
3898 | - if (NOT result) |
3899 | - execute_process (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3900 | - --query "data(info/entry/url)" |
3901 | - --context-item "${tmpdir}/tmpinfo.xml" |
3902 | - OUTPUT_VARIABLE subdir_svnroot) |
3903 | - file (REMOVE "${tmpdir}/tmpinfo.xml") |
3904 | - if (subdir_svnroot STREQUAL svnroot) |
3905 | - set (svndir "${subdir}") |
3906 | - break () |
3907 | - endif (subdir_svnroot STREQUAL svnroot) |
3908 | - endif (NOT result) |
3909 | - endforeach (subdir) |
3910 | - if (NOT svndir) |
3911 | - # No matching URL found; use basename of input file |
3912 | - get_filename_component (basename "${changesfile}" NAME_WE) |
3913 | - set (svndir "${outdir}/${basename}") |
3914 | - endif (NOT svndir) |
3915 | - file (APPEND "${logfile}" "..outputting to ${svndir}\n") |
3916 | - set (${resultdir_var} "${svndir}" PARENT_SCOPE) |
3917 | - |
3918 | - execute_process (COMMAND "${svn}" checkout |
3919 | - -r "${svnrev}" "${svnroot}" "${svndir}" |
3920 | - OUTPUT_VARIABLE svnlog ERROR_VARIABLE svnlog) |
3921 | - file (APPEND "${logfile}" ${svnlog}) |
3922 | - |
3923 | - # Copy modified/added files on top of svn directory |
3924 | - file (APPEND "${logfile}" "Copying added/modified files...\n") |
3925 | - execute_process (COMMAND "${CMAKE_COMMAND}" -E copy_directory |
3926 | - "${chgdir}/files" "${svndir}") |
3927 | - file (APPEND "${logfile}" "Done copying.\n") |
3928 | - |
3929 | - # Modified files are already all set. Process svn-status.xml to |
3930 | - # delete any files which were deleted on client's svn, as named in |
3931 | - # the client's changelist. |
3932 | - file (READ "${chgdir}/changelist" changelist) |
3933 | - get_files_with_status (deletefiles |
3934 | - "${chgdir}/svn-status.xml" "${changelist}" deleted) |
3935 | - execute_process (COMMAND "${ZORBA_EXE}" --omit-xml-declaration |
3936 | - --query "data(info/entry/@path)" |
3937 | - --context-item "${chgdir}/svn-info.xml" |
3938 | - OUTPUT_VARIABLE clientroot) |
3939 | - # clientroot and the filepaths below are absolute paths from the |
3940 | - # client, which might be Windows-style paths with drive letters. The |
3941 | - # following is a horrific hack which lets us get the remote path |
3942 | - # component no matter which platform they came from. (Note: This |
3943 | - # only works on Linux, which is the platform the remote queue runs |
3944 | - # on. If we ever have a Windows remote queue machine, this will |
3945 | - # die.) |
3946 | - # 1. Stick a leading / on them, so Linux thinks they're absolute. |
3947 | - # 2. Convert to "CMake paths", which have forward-slashes. |
3948 | - # 3. Do relative_path as normal. |
3949 | - file (TO_CMAKE_PATH "/${clientroot}" clientroot) |
3950 | - foreach (filepath ${deletefiles}) |
3951 | - file (TO_CMAKE_PATH "/${filepath}" filepath) |
3952 | - file (RELATIVE_PATH relpath "${clientroot}" "${filepath}") |
3953 | - execute_process (COMMAND "${svn}" delete "${svndir}/${relpath}" |
3954 | - OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result) |
3955 | - file (APPEND "${logfile}" "${output}") |
3956 | - if (result) |
3957 | - set (${result_var} ${result} PARENT_SCOPE) |
3958 | - return () |
3959 | - endif () |
3960 | - endforeach (filepath ${deletefiles}) |
3961 | - |
3962 | - # Now add any new files, using the local output of "svn status" to |
3963 | - # find "unversioned" files. (We could read the svn-status.xml from |
3964 | - # the changes file, but when it is based on a changelist, it won't |
3965 | - # include directories to add.) |
3966 | - execute_process (COMMAND "${svn}" --xml status "${svndir}" |
3967 | - OUTPUT_FILE "${chgdir}/svn-status.xml") |
3968 | - get_files_with_status (addfiles "${chgdir}/svn-status.xml" "" unversioned) |
3969 | - foreach (filepath ${addfiles}) |
3970 | - execute_process (COMMAND "${svn}" add "${filepath}" |
3971 | - OUTPUT_VARIABLE output ERROR_VARIABLE output RESULT_VARIABLE result) |
3972 | - file (APPEND "${logfile}" "${output}") |
3973 | - if (result) |
3974 | - set (${result_var} ${result} PARENT_SCOPE) |
3975 | - return () |
3976 | - endif () |
3977 | - endforeach (filepath ${addfiles}) |
3978 | - |
3979 | - # Remove temporary unpackaged workingset |
3980 | - file (REMOVE_RECURSE "${chgdir}") |
3981 | - |
3982 | -endfunction (svn_unpackage) |
3983 | |
3984 | === removed file 'test/test_index.cpp' |
3985 | --- test/test_index.cpp 2013-02-07 17:24:36 +0000 |
3986 | +++ test/test_index.cpp 1970-01-01 00:00:00 +0000 |
3987 | @@ -1,311 +0,0 @@ |
3988 | -/* |
3989 | - * Copyright 2006-2008 The FLWOR Foundation. |
3990 | - * |
3991 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
3992 | - * you may not use this file except in compliance with the License. |
3993 | - * You may obtain a copy of the License at |
3994 | - * |
3995 | - * http://www.apache.org/licenses/LICENSE-2.0 |
3996 | - * |
3997 | - * Unless required by applicable law or agreed to in writing, software |
3998 | - * distributed under the License is distributed on an "AS IS" BASIS, |
3999 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
4000 | - * See the License for the specific language governing permissions and |
4001 | - * limitations under the License. |
4002 | - */ |
4003 | - |
4004 | - |
4005 | -#include <zorba/zorba.h> |
4006 | -#include <zorba/store_manager.h> |
4007 | - |
4008 | -#include "diagnostics/errors.h" |
4009 | -#include "store/api/item.h" |
4010 | -#include "store/api/item_factory.h" |
4011 | -#include "store/api/iterator_factory.h" |
4012 | -#include "store/api/index.h" |
4013 | - |
4014 | -#include "store/naive/simple_store.h" |
4015 | -#include "store/naive/store_defs.h" |
4016 | - |
4017 | -using namespace zorba; |
4018 | -using namespace zorba::store; |
4019 | - |
4020 | - |
4021 | -long theIndex1[][2] = |
4022 | -{ |
4023 | - { 30, 86 }, |
4024 | - { 40, 4 }, |
4025 | - { 40, 14 }, |
4026 | - { 50, 59 }, |
4027 | - { 52, 10 }, |
4028 | - { 52, 20 }, |
4029 | - { 52, 30 }, |
4030 | - { 52, 30 } |
4031 | -}; |
4032 | - |
4033 | -ulong theNumIndexEntries = 8; |
4034 | - |
4035 | - |
4036 | -void parseKey( |
4037 | - int argc, |
4038 | - const char * argv[], |
4039 | - int& arg, |
4040 | - std::vector<long>& res, |
4041 | - std::vector<bool>& incl, |
4042 | - std::vector<bool>& inf) |
4043 | -{ |
4044 | - ulong numCols = atoi(argv[arg]); |
4045 | - res.resize(numCols); |
4046 | - incl.resize(numCols); |
4047 | - inf.resize(numCols); |
4048 | - |
4049 | - arg++; |
4050 | - ulong i; |
4051 | - for (i = 0; i < numCols && arg < argc; i++, arg++) |
4052 | - { |
4053 | - if (strcmp(argv[arg], "inf") == 0) |
4054 | - { |
4055 | - inf[i] = true; |
4056 | - incl[i] = false; |
4057 | - } |
4058 | - else |
4059 | - { |
4060 | - res[i] = atoi(argv[arg]); |
4061 | - inf[i] = false; |
4062 | - |
4063 | - arg++; |
4064 | - |
4065 | - if (*(argv[arg]) == 't') |
4066 | - { |
4067 | - incl[i] = true; |
4068 | - } |
4069 | - else if (*(argv[arg]) == 'f') |
4070 | - { |
4071 | - incl[i] = false; |
4072 | - } |
4073 | - else |
4074 | - { |
4075 | - std::cout << "bad usage" << std::endl; |
4076 | - abort(); |
4077 | - } |
4078 | - } |
4079 | - } |
4080 | - |
4081 | - if (i < numCols) |
4082 | - { |
4083 | - std::cout << "bad usage" << std::endl; |
4084 | - abort(); |
4085 | - } |
4086 | -} |
4087 | - |
4088 | - |
4089 | -/******************************************************************************* |
4090 | - |
4091 | - usage ::= "test_index" LowKey? HighKey? |
4092 | - |
4093 | - LowKey ::= "-lk" NumColumns (ColumnSpec)+ |
4094 | - |
4095 | - HighKey ::= "-hk" NumColumns (ColumnSpec)+ |
4096 | - |
4097 | - NumColumns ::= any non-negative number |
4098 | - |
4099 | - ColumnSpec ::= (Value | "inf") ("t" | "f") |
4100 | - |
4101 | - Value ::= any integer value |
4102 | - |
4103 | - Note1: The number of ColumnSpecs in LowKey or HighKey spec must be equal to |
4104 | - the NumColumns in that spec. |
4105 | - |
4106 | - Note2: The "t" and "f" flags in a ColumnSpec indicate whether the Value is |
4107 | - to be included in the range or not. |
4108 | - |
4109 | - Examples: |
4110 | - |
4111 | - test_index |
4112 | - test_index -lk 1 40 t -hk 1 50 f |
4113 | - test_index -lk 1 40 t |
4114 | - test_index -lk 1 40 f -hk 2 50 f 10 t |
4115 | - |
4116 | -********************************************************************************/ |
4117 | -int main(int argc, const char * argv[]) |
4118 | -{ |
4119 | - // |
4120 | - // Store initialization |
4121 | - // |
4122 | - simplestore::SimpleStore* store = StoreManager::getStore(); |
4123 | - |
4124 | - store::ItemFactory* f = store->getItemFactory(); |
4125 | - store::IteratorFactory* iteFactory = store->getIteratorFactory(); |
4126 | - |
4127 | - // |
4128 | - // Parse args |
4129 | - // |
4130 | - std::vector<long> low_key; |
4131 | - std::vector<bool> low_incl; |
4132 | - std::vector<bool> low_inf; |
4133 | - std::vector<long> high_key; |
4134 | - std::vector<bool> high_incl; |
4135 | - std::vector<bool> high_inf; |
4136 | - |
4137 | - int arg = 1; |
4138 | - while (arg < argc) |
4139 | - { |
4140 | - if (strcmp(argv[arg], "-lk") == 0) |
4141 | - { |
4142 | - arg++; |
4143 | - parseKey(argc, argv, arg, low_key, low_incl, low_inf); |
4144 | - } |
4145 | - else if (strcmp(argv[arg], "-hk") == 0) |
4146 | - { |
4147 | - arg++; |
4148 | - parseKey(argc, argv, arg, high_key, high_incl, high_inf); |
4149 | - } |
4150 | - else |
4151 | - { |
4152 | - arg++; |
4153 | - } |
4154 | - } |
4155 | - |
4156 | - ulong high_size = high_key.size(); |
4157 | - ulong low_size = low_key.size(); |
4158 | - |
4159 | - if (low_size < high_size) |
4160 | - { |
4161 | - low_key.resize(high_size); |
4162 | - low_incl.resize(high_size); |
4163 | - low_inf.resize(high_size); |
4164 | - |
4165 | - for (ulong i = low_size; i < high_size; i++) |
4166 | - { |
4167 | - low_incl[i] = false; |
4168 | - low_inf[i] = true; |
4169 | - } |
4170 | - } |
4171 | - else if (low_key.size() > high_key.size()) |
4172 | - { |
4173 | - high_key.resize(low_size); |
4174 | - high_incl.resize(low_size); |
4175 | - high_inf.resize(low_size); |
4176 | - |
4177 | - for (ulong i = high_size; i < low_size; i++) |
4178 | - { |
4179 | - high_incl[i] = false; |
4180 | - high_inf[i] = true; |
4181 | - } |
4182 | - } |
4183 | - |
4184 | - // |
4185 | - // Create sorted index mapping a pair of integeres to an integer |
4186 | - // |
4187 | - ulong numColumns = 2; |
4188 | - |
4189 | - IndexSpecification spec(numColumns); |
4190 | - spec.theIsUnique = false; |
4191 | - spec.theIsSorted = true; |
4192 | - spec.theIsTemp = false; |
4193 | - spec.theIsThreadSafe = false; |
4194 | - spec.theTimezone = 0; |
4195 | - |
4196 | - spec.theKeyTypes[0] = store->theSchemaTypeNames[simplestore::XS_INT]; |
4197 | - spec.theKeyTypes[0] = store->theSchemaTypeNames[simplestore::XS_INT]; |
4198 | - spec.theValueType = store->theSchemaTypeNames[simplestore::XS_STRING]; |
4199 | - |
4200 | - xqpStringStore_t uri(new xqpStringStore("test_index")); |
4201 | - |
4202 | - Index_t index = store->createIndex(uri, spec); |
4203 | - |
4204 | - // |
4205 | - // Create items for all ints between 0 and N-1 |
4206 | - // |
4207 | - // |
4208 | - const ulong N = 100; |
4209 | - Item_t ints[N]; |
4210 | - for (ulong i = 0; i < N; i++) |
4211 | - f->createInt(ints[i], i); |
4212 | - |
4213 | - // |
4214 | - // Populate the index |
4215 | - // |
4216 | - IndexKey key(numColumns); |
4217 | - Item_t value; |
4218 | - |
4219 | - for (ulong i = 0; i < theNumIndexEntries; i++) |
4220 | - { |
4221 | - std::ostringstream str; |
4222 | - |
4223 | - for (ulong j = 0; j < numColumns; j++) |
4224 | - { |
4225 | - key[j] = ints[theIndex1[i][j]]; |
4226 | - |
4227 | - str << theIndex1[i][j] << " "; |
4228 | - } |
4229 | - |
4230 | - xqpStringStore_t valuestr = new xqpStringStore(str.str()); |
4231 | - |
4232 | - f->createString(value, valuestr); |
4233 | - |
4234 | - index->insert(key, value); |
4235 | - } |
4236 | - |
4237 | - // |
4238 | - // Probe the index |
4239 | - // |
4240 | - IndexProbeIterator* ite = iteFactory->createIndexProbeIterator(index); |
4241 | - |
4242 | - IndexBoxCondition_t cond = index->createBoxCondition(); |
4243 | - |
4244 | - if (low_key.empty()) |
4245 | - { |
4246 | - Item_t v = ints[0]; |
4247 | - |
4248 | - cond->pushRange(v, v, false, false, false, false); |
4249 | - } |
4250 | - else |
4251 | - { |
4252 | - for (ulong i = 0; i < low_key.size(); i++) |
4253 | - { |
4254 | - Item_t l = ints[low_key[i]]; |
4255 | - Item_t h = ints[high_key[i]]; |
4256 | - |
4257 | - cond->pushRange(l, h, !low_inf[i], !high_inf[i], low_incl[i], high_incl[i]); |
4258 | - } |
4259 | - } |
4260 | - |
4261 | - try |
4262 | - { |
4263 | - std::cout << "Probing condition : " << cond->toString() << std::endl; |
4264 | - |
4265 | - ite->init(cond); |
4266 | - ite->open(); |
4267 | - |
4268 | - store::Item_t res; |
4269 | - bool more = ite->next(res); |
4270 | - while (more) |
4271 | - { |
4272 | - std::cout << res->getStringValue()->c_str() << std::endl; |
4273 | - more = ite->next(res); |
4274 | - } |
4275 | - } |
4276 | - catch(error::ZorbaError& e) |
4277 | - { |
4278 | - std::cout << e.theDescription << std::endl; |
4279 | - } |
4280 | - |
4281 | - ite->close(); |
4282 | - delete ite; |
4283 | - |
4284 | - cond = NULL; |
4285 | - |
4286 | - // |
4287 | - // Shutdown |
4288 | - // |
4289 | - |
4290 | - spec.clear(); |
4291 | - store->deleteIndex(uri); |
4292 | - index = NULL; |
4293 | - |
4294 | - store->shutdown(); |
4295 | - return 0; |
4296 | - |
4297 | -} |
4298 | - |
4299 | |
4300 | === removed file 'test/test_plan_serializer.cpp' |
4301 | --- test/test_plan_serializer.cpp 2013-02-07 17:24:36 +0000 |
4302 | +++ test/test_plan_serializer.cpp 1970-01-01 00:00:00 +0000 |
4303 | @@ -1,125 +0,0 @@ |
4304 | -/* |
4305 | - * Copyright 2006-2008 The FLWOR Foundation. |
4306 | - * |
4307 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
4308 | - * you may not use this file except in compliance with the License. |
4309 | - * You may obtain a copy of the License at |
4310 | - * |
4311 | - * http://www.apache.org/licenses/LICENSE-2.0 |
4312 | - * |
4313 | - * Unless required by applicable law or agreed to in writing, software |
4314 | - * distributed under the License is distributed on an "AS IS" BASIS, |
4315 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
4316 | - * See the License for the specific language governing permissions and |
4317 | - * limitations under the License. |
4318 | - */ |
4319 | -#include <fstream> |
4320 | -#include <iostream> |
4321 | -#include <sstream> |
4322 | - |
4323 | -#include <zorba/zorba.h> |
4324 | -#include <zorba/store_manager.h> |
4325 | -#include <zorba/util/path.h> |
4326 | -#include <zorba/xquery_exception.h> |
4327 | -#include "timer.h" |
4328 | - |
4329 | -using namespace zorba; |
4330 | -using namespace std; |
4331 | - |
4332 | - |
4333 | -int |
4334 | -main(int argc, char* argv[]) |
4335 | -{ |
4336 | - void* store = zorba::StoreManager::getStore(); |
4337 | - Zorba* zengine = Zorba::getInstance(store); |
4338 | - |
4339 | - if (argc != 2) { |
4340 | - std::cerr << "Usage: test_plan_serializer <query_file>" << std::endl; |
4341 | - return 1; |
4342 | - } |
4343 | - |
4344 | - XQuery_t lQuery = zengine->createQuery(); |
4345 | - try { |
4346 | - std::ifstream lQueryFile(argv[1]); |
4347 | - |
4348 | - if (!lQueryFile) { |
4349 | - std::cerr << "file" << argv[1] << " does not exist" << std::endl; |
4350 | - return 2; |
4351 | - } |
4352 | - |
4353 | - lQuery->setFileName(argv[1]); |
4354 | - lQuery = zengine->compileQuery (lQueryFile); |
4355 | - |
4356 | - } catch (XQueryException& e) { |
4357 | - cerr << "Couldn't compile query: " << e << endl; |
4358 | - return 3; |
4359 | - } catch (ZorbaException& e) { |
4360 | - // no need to close because the object is not valid |
4361 | - cerr << "Couldn't compile query: " << e << endl; |
4362 | - return 4; |
4363 | - } |
4364 | - |
4365 | - |
4366 | - std::ostringstream lPlanFileName; |
4367 | - lPlanFileName << argv[1] << ".plan"; |
4368 | - |
4369 | - try { |
4370 | - |
4371 | - Timer lTimer; |
4372 | - lTimer.start(); |
4373 | - |
4374 | - for (int i = 0; i < 100; ++i) { |
4375 | - std::ofstream lExecPlan(lPlanFileName.str().c_str()); |
4376 | - |
4377 | - if (!lExecPlan) { |
4378 | - std::cerr << "cannot write to file " << lPlanFileName.str() << std::endl; |
4379 | - return 5; |
4380 | - } |
4381 | - |
4382 | - lQuery->saveExecutionPlan(lExecPlan, ZORBA_USE_BINARY_ARCHIVE, DONT_SAVE_UNUSED_FUNCTIONS); |
4383 | - |
4384 | - } |
4385 | - lTimer.end(); |
4386 | - |
4387 | - std::cout << "time needed to save the compile plan: " << std::endl; |
4388 | - lTimer.print(std::cout); |
4389 | - } catch (ZorbaException& e) { |
4390 | - // no need to close because the object is not valid |
4391 | - cerr << "Couldn't create compiled plan for query: " << e << endl; |
4392 | - return 6; |
4393 | - } |
4394 | - |
4395 | - try { |
4396 | - |
4397 | - Timer lTimer; |
4398 | - lTimer.suspend(); |
4399 | - |
4400 | - for (int i = 0; i < 100; ++i) { |
4401 | - std::ifstream lExecPlan(lPlanFileName.str().c_str()); |
4402 | - |
4403 | - if (!lExecPlan) { |
4404 | - std::cerr << "cannot read from file " << lPlanFileName.str() << std::endl; |
4405 | - return 5; |
4406 | - } |
4407 | - |
4408 | - |
4409 | - lQuery = zengine->createQuery(); |
4410 | - lQuery->setFileName(argv[1]); |
4411 | - |
4412 | - lTimer.resume(); |
4413 | - lQuery->loadExecutionPlan(lExecPlan); |
4414 | - lTimer.suspend(); |
4415 | - } |
4416 | - |
4417 | - lTimer.end(); |
4418 | - |
4419 | - std::cout << "time needed to load the compile plan: " << std::endl; |
4420 | - lTimer.print(std::cout); |
4421 | - } catch (ZorbaException& e) { |
4422 | - // no need to close because the object is not valid |
4423 | - cerr << "Couldn't load compiled plan for query: " << e << endl; |
4424 | - return 6; |
4425 | - } |
4426 | - |
4427 | - return 0; |
4428 | -} |
4429 | |
4430 | === removed file 'test/test_store.cpp' |
4431 | --- test/test_store.cpp 2013-02-07 17:24:36 +0000 |
4432 | +++ test/test_store.cpp 1970-01-01 00:00:00 +0000 |
4433 | @@ -1,403 +0,0 @@ |
4434 | -/* |
4435 | - * Copyright 2006-2008 The FLWOR Foundation. |
4436 | - * |
4437 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
4438 | - * you may not use this file except in compliance with the License. |
4439 | - * You may obtain a copy of the License at |
4440 | - * |
4441 | - * http://www.apache.org/licenses/LICENSE-2.0 |
4442 | - * |
4443 | - * Unless required by applicable law or agreed to in writing, software |
4444 | - * distributed under the License is distributed on an "AS IS" BASIS, |
4445 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
4446 | - * See the License for the specific language governing permissions and |
4447 | - * limitations under the License. |
4448 | - */ |
4449 | - |
4450 | -#include <fstream> |
4451 | - |
4452 | -#include "timer.h" |
4453 | - |
4454 | -#include <zorba/zorba.h> |
4455 | -#include <zorba/store_manager.h> |
4456 | - |
4457 | -#include "diagnostics/errors.h" |
4458 | -#include "store/naive/atomic_items.h" |
4459 | -#include "store/naive/node_items.h" |
4460 | -#include "store/naive/dataguide.h" |
4461 | -#include "store/naive/simple_store.h" |
4462 | -#include "store/naive/simple_collection.h" |
4463 | -#include "zorbatypes/datetime.h" |
4464 | -#include "zorbatypes/duration.h" |
4465 | - |
4466 | - |
4467 | -using namespace zorba; |
4468 | - |
4469 | -using namespace zorba::store; |
4470 | - |
4471 | - |
4472 | -void readXmlFile(const char* fileName, std::string& xmlString) |
4473 | -{ |
4474 | - std::ifstream xmlFile(fileName); |
4475 | - if(!xmlFile) |
4476 | - { |
4477 | - std::cerr << "Error while opening: " << fileName << std::endl; |
4478 | - abort(); |
4479 | - } |
4480 | - |
4481 | - xmlString.clear(); |
4482 | - |
4483 | - char delim = '\n'; |
4484 | - |
4485 | - while (xmlFile) |
4486 | - { |
4487 | - std::string tmp; |
4488 | - getline(xmlFile, tmp, delim); |
4489 | - xmlString += tmp; |
4490 | - xmlString += delim; |
4491 | - } |
4492 | - xmlFile.close(); |
4493 | -} |
4494 | - |
4495 | - |
4496 | -int main(int argc, const char * argv[]) |
4497 | -{ |
4498 | - if (argc < 2 || argc > 4) |
4499 | - { |
4500 | - std::cerr << "usage: test_store -n <times> <input file name>" << std::endl; |
4501 | - } |
4502 | - |
4503 | - Timer timer; |
4504 | - std::string fileName; |
4505 | - ulong numLoads = 0; |
4506 | - |
4507 | - int arg = 1; |
4508 | - while (arg < argc) |
4509 | - { |
4510 | - if (strcmp(argv[arg], "-n") == 0) |
4511 | - { |
4512 | - arg++; |
4513 | - numLoads = atol(argv[arg]); |
4514 | - } |
4515 | - else |
4516 | - { |
4517 | - fileName = argv[arg]; |
4518 | - } |
4519 | - |
4520 | - arg++; |
4521 | - } |
4522 | - |
4523 | - std::cout << "doc file = " << fileName << std::endl << "numLoads = " |
4524 | - << numLoads << std::endl; |
4525 | - |
4526 | - // |
4527 | - // Store initialization |
4528 | - // |
4529 | - simplestore::SimpleStore* lStore = StoreManager::getStore(); |
4530 | - |
4531 | - // |
4532 | - // Test boost::shared_ptr |
4533 | - // |
4534 | -#if 0 |
4535 | - zorba::store::OrdPath* ordp = new zorba::store::OrdPath(); |
4536 | - |
4537 | - boost::shared_ptr<zorba::store::OrdPath> p1(ordp); |
4538 | - boost::shared_ptr<zorba::store::OrdPath> p2(ordp); |
4539 | - |
4540 | - std::cout << "p1 count = " << p1.use_count() |
4541 | - << " p2 count = " << p2.use_count() << std::endl; |
4542 | - |
4543 | - p2 = p1; |
4544 | -#endif |
4545 | - |
4546 | - // |
4547 | - // Re-acquirable latch |
4548 | - // |
4549 | - lStore->getGlobalLock().rlock(); |
4550 | - // lStore->getGlobalLock().wlock(); this will block |
4551 | - lStore->getGlobalLock().rlock(); // this is ok. |
4552 | - lStore->getGlobalLock().unlock(); |
4553 | - lStore->getGlobalLock().unlock(); |
4554 | - |
4555 | - // |
4556 | - // RC_TIMMING |
4557 | - // |
4558 | - //#define RC_TIMMING |
4559 | - |
4560 | -#ifdef RC_TIMMING |
4561 | - |
4562 | - ulong loop = 1000000; |
4563 | - const char* data = "aaaaaaa0000000"; |
4564 | - ulong datalen = strlen(data); |
4565 | - |
4566 | - for (ulong i = 0; i < loop; i++) |
4567 | - { |
4568 | - char* tmp = new char[datalen + 1]; |
4569 | - memcpy(tmp, data, datalen); |
4570 | - delete [] tmp; |
4571 | - } |
4572 | - |
4573 | - timer.end(); |
4574 | - std::cout << "char-pointer alloc time : " << timer.getTime() << std::endl; |
4575 | - timer.start(); |
4576 | - |
4577 | - for (ulong i = 0; i < loop; i++) |
4578 | - { |
4579 | - xqpStringStore* tmp = new xqpStringStore(data); |
4580 | - delete tmp; |
4581 | - } |
4582 | - |
4583 | - timer.end(); |
4584 | - std::cout << "String-pointer alloc time : " << timer.getTime() << std::endl; |
4585 | - timer.start(); |
4586 | - |
4587 | - for (ulong i = 0; i < loop; i++) |
4588 | - { |
4589 | - xqpStringStore_t tmp = new xqpStringStore(data); |
4590 | - } |
4591 | - |
4592 | - timer.end(); |
4593 | - std::cout << "String-handle alloc time : " << timer.getTime() << std::endl; |
4594 | - timer.start(); |
4595 | - |
4596 | -#endif // RC_TIMMING |
4597 | - |
4598 | - // |
4599 | - // Create collections |
4600 | - // |
4601 | - store::Collection_t coll1; |
4602 | - store::Collection_t coll2; |
4603 | - |
4604 | - try |
4605 | - { |
4606 | - xqpStringStore_t uri(new xqpStringStore("http://MyCollection1")); |
4607 | - coll1 = lStore->createCollection(uri); |
4608 | - |
4609 | - std::cout << coll1->getUri()->show() << std::endl; |
4610 | - |
4611 | - coll2 = lStore->createCollection(uri); |
4612 | - } |
4613 | - catch (error::ZorbaError& e) |
4614 | - { |
4615 | - std::cout << e.theDescription << std::endl; |
4616 | - } |
4617 | - |
4618 | - // |
4619 | - // Repeatedly load an xml doc from a file to the store |
4620 | - // |
4621 | - |
4622 | - double totalTime = 0; |
4623 | - |
4624 | - for (ulong i = 0; i < numLoads; i++) |
4625 | - { |
4626 | - timer.start(); |
4627 | - |
4628 | - std::ifstream ifs; |
4629 | - ifs.open(fileName.c_str(), std::ios::in); |
4630 | - if(!ifs.is_open()) |
4631 | - { |
4632 | - std::cerr << "Error while opening: " << fileName << std::endl; |
4633 | - abort(); |
4634 | - } |
4635 | - |
4636 | - store::Item_t doc; |
4637 | - xqpStringStore_t docuri(new xqpStringStore(fileName)); |
4638 | - |
4639 | - try |
4640 | - { |
4641 | - doc = lStore->loadDocument(docuri, ifs); |
4642 | - } |
4643 | - catch (zorba::error::ZorbaError& e) |
4644 | - { |
4645 | - std::cout << e.theDescription << std::endl; |
4646 | - return 1; |
4647 | - } |
4648 | - |
4649 | - timer.end(); |
4650 | - if (i == 0) |
4651 | - std::cout << "First loading time : " << timer.getTime() << std::endl; |
4652 | - else |
4653 | - totalTime += timer.getTime(); |
4654 | - |
4655 | - lStore->deleteDocument(docuri); |
4656 | - doc = 0; |
4657 | - |
4658 | - ifs.close(); |
4659 | - } |
4660 | - |
4661 | - if (numLoads > 1) |
4662 | - { |
4663 | - std::cout << "Average loading time : " << totalTime / (numLoads - 1) << std::endl; |
4664 | - } |
4665 | - |
4666 | - // |
4667 | - // Load the doc to the collection, and keep a ref to it. |
4668 | - // |
4669 | - std::ifstream xmlFile(fileName.c_str()); |
4670 | - if(!xmlFile) |
4671 | - { |
4672 | - std::cerr << "Error while opening: " << fileName << std::endl; |
4673 | - abort(); |
4674 | - } |
4675 | - |
4676 | - std::iostream xmlStream(xmlFile.rdbuf()); |
4677 | - store::Item_t doc; |
4678 | - |
4679 | - try |
4680 | - { |
4681 | - doc = coll1->loadDocument(xmlStream); |
4682 | - } |
4683 | - catch (zorba::error::ZorbaError& e) |
4684 | - { |
4685 | - std::cout << e.theDescription << std::endl; |
4686 | - return 1; |
4687 | - } |
4688 | - |
4689 | - xmlFile.close(); |
4690 | - |
4691 | - // |
4692 | - // Destroy collection |
4693 | - // |
4694 | - lStore->deleteCollection(coll1->getUri()->getStringValue()); |
4695 | - coll1 = 0; |
4696 | - |
4697 | - // |
4698 | - // Print out loaded document |
4699 | - // |
4700 | -#if 0 |
4701 | - fileName += ".res"; |
4702 | - std::ofstream outXmlFile(fileName.c_str()); |
4703 | - if(!outXmlFile) |
4704 | - { |
4705 | - std::cerr << "Error while opening: " << fileName << std::endl; |
4706 | - abort(); |
4707 | - } |
4708 | - |
4709 | - if (doc != NULL) |
4710 | - outXmlFile << doc->show() << std::endl; |
4711 | - else |
4712 | - return 1; |
4713 | -#endif |
4714 | - |
4715 | - // |
4716 | - // Test node references |
4717 | - // |
4718 | - store::Item_t uri; |
4719 | - lStore->getReference(uri, doc); |
4720 | - std::cout << "Reference URI for node: " << doc.getp() << " is: " |
4721 | - << uri->getStringValue()->c_str() << std::endl; |
4722 | - |
4723 | - try |
4724 | - { |
4725 | - xqpStringStore_t uri(new xqpStringStore("http://MyCollection1")); |
4726 | - coll1 = lStore->createCollection(uri); |
4727 | - |
4728 | - std::cout << coll1->getUri()->show() << std::endl; |
4729 | - |
4730 | - coll1->addNode(doc); |
4731 | - } |
4732 | - catch (error::ZorbaError& e) |
4733 | - { |
4734 | - std::cout << e.theDescription << std::endl; |
4735 | - } |
4736 | - |
4737 | - store::Item_t doc2; |
4738 | - if (!lStore->getNodeByReference(doc2, uri)) { |
4739 | - doc2 = NULL; |
4740 | - } |
4741 | - |
4742 | - if (doc != doc2) |
4743 | - std::cout << "ERROR" << std::endl; |
4744 | - |
4745 | - zorba::simplestore::XmlNode* rootNode = |
4746 | - reinterpret_cast<zorba::simplestore::XmlNode*>(doc.getp()); |
4747 | - |
4748 | - for (ulong i = 0; i < 3; i++) |
4749 | - { |
4750 | - zorba::simplestore::XmlNode* parent = rootNode; |
4751 | - |
4752 | - double factor = 0.0; |
4753 | - if (i == 0) factor = 0.5; |
4754 | - else if (i == 1) factor = 0.66; |
4755 | - else if (i == 2) factor = 0.90; |
4756 | - |
4757 | - std::vector<const zorba::store::Item*> ctxPath; |
4758 | - std::vector<const zorba::store::Item*> relPath; |
4759 | - |
4760 | - while (1) |
4761 | - { |
4762 | - ulong numChildren = parent->numChildren(); |
4763 | - if (numChildren == 0) |
4764 | - break; |
4765 | - |
4766 | - ulong childPos = (ulong)(numChildren * factor); |
4767 | - zorba::simplestore::XmlNode* child = parent->getChild(childPos); |
4768 | - |
4769 | - while (child->getNodeKind() != StoreConsts::elementNode) |
4770 | - { |
4771 | - childPos++; |
4772 | - if (childPos == numChildren) |
4773 | - break; |
4774 | - |
4775 | - child = parent->getChild(childPos); |
4776 | - } |
4777 | - |
4778 | - if (childPos == numChildren) |
4779 | - break; |
4780 | - |
4781 | - ctxPath.push_back(child->getNodeName()); |
4782 | - |
4783 | - lStore->getReference(uri, child); |
4784 | - std::cout << "Reference URI for node " << child << ":" |
4785 | - << child->getNodeName()->getStringValue()->c_str() |
4786 | - << " at position " << childPos |
4787 | - << " is: " << uri->getStringValue()->c_str() << std::endl; |
4788 | - |
4789 | - Item_t child2; |
4790 | - if (!lStore->getNodeByReference(child2, uri)) { |
4791 | - child2 = NULL; |
4792 | - } |
4793 | - |
4794 | - if (child != child2.getp()) |
4795 | - std::cout << "ERROR" << std::endl; |
4796 | - |
4797 | - parent = child; |
4798 | - } |
4799 | - |
4800 | -#ifdef DATAGUIDE |
4801 | - if (rootNode->getDataGuide() != NULL) |
4802 | - { |
4803 | - bool found, unique; |
4804 | - rootNode->getDataGuide()->getPathInfo(ctxPath, relPath, false, found, unique); |
4805 | - std::cout << "Info for path : "; |
4806 | - |
4807 | - for (ulong i = 0; i < ctxPath.size(); i++) |
4808 | - std::cout << "/" << *ctxPath[i]->getStringValue(); |
4809 | - |
4810 | - std::cout << std::endl << "found = " << found << " unique = " |
4811 | - << unique << std::endl; |
4812 | - |
4813 | - relPath.resize(1); |
4814 | - relPath[0] = ctxPath[ctxPath.size()-1]; |
4815 | - ctxPath.resize(ctxPath.size()-1); |
4816 | - |
4817 | - rootNode->getDataGuide()->getPathInfo(ctxPath, relPath, false, found, unique); |
4818 | - |
4819 | - std::cout << "found = " << found << " unique = " << unique |
4820 | - << std::endl << std::endl; |
4821 | - } |
4822 | -#endif |
4823 | - } |
4824 | - |
4825 | - // |
4826 | - // Shutdown |
4827 | - // |
4828 | - lStore->deleteCollection(coll1->getUri()->getStringValue()); |
4829 | - coll1 = 0; |
4830 | - doc = 0; |
4831 | - doc2 = 0; |
4832 | - |
4833 | - lStore->shutdown(); |
4834 | - return 0; |
4835 | -} |
4836 | - |
4837 | |
4838 | === removed directory 'test/testsuites' |
4839 | === removed file 'test/testsuites/CMakeLists.txt' |
4840 | --- test/testsuites/CMakeLists.txt 2013-02-07 17:24:36 +0000 |
4841 | +++ test/testsuites/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
4842 | @@ -1,27 +0,0 @@ |
4843 | -# Copyright 2006-2010 The FLWOR Foundation. |
4844 | -# |
4845 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
4846 | -# you may not use this file except in compliance with the License. |
4847 | -# You may obtain a copy of the License at |
4848 | -# |
4849 | -# http://www.apache.org/licenses/LICENSE-2.0 |
4850 | -# |
4851 | -# Unless required by applicable law or agreed to in writing, software |
4852 | -# distributed under the License is distributed on an "AS IS" BASIS, |
4853 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
4854 | -# See the License for the specific language governing permissions and |
4855 | -# limitations under the License. |
4856 | - |
4857 | -# This directory exists solely as a place for external testsuites to |
4858 | -# be plugged in to the Zorba test system. By default it is empty and |
4859 | -# has no tests. Any subdirectories (or symlinks to subdirectories) |
4860 | -# that are placed here will be added so that they may add tests. |
4861 | -# |
4862 | -# To be picked up, subdirectories must be named "*_testsuite". Tests |
4863 | -# which are added by these suites should have the string "*_testsuite" |
4864 | -# in their name, to facilitate execution with ctest -R. |
4865 | - |
4866 | -file (GLOB testsuites "*_testsuite") |
4867 | -foreach (testsuite ${testsuites}) |
4868 | - add_subdirectory("${testsuite}") |
4869 | -endforeach (testsuite) |
4870 | |
4871 | === removed file 'test/timer.cpp' |
4872 | --- test/timer.cpp 2013-02-07 17:24:36 +0000 |
4873 | +++ test/timer.cpp 1970-01-01 00:00:00 +0000 |
4874 | @@ -1,126 +0,0 @@ |
4875 | -/* |
4876 | - * Copyright 2006-2008 The FLWOR Foundation. |
4877 | - * |
4878 | - * Licensed under the Apache License, Version 2.0 (the "License"); |
4879 | - * you may not use this file except in compliance with the License. |
4880 | - * You may obtain a copy of the License at |
4881 | - * |
4882 | - * http://www.apache.org/licenses/LICENSE-2.0 |
4883 | - * |
4884 | - * Unless required by applicable law or agreed to in writing, software |
4885 | - * distributed under the License is distributed on an "AS IS" BASIS, |
4886 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
4887 | - * See the License for the specific language governing permissions and |
4888 | - * limitations under the License. |
4889 | - */ |
4890 | -#include "timer.h" |
4891 | -#include <iostream> |
4892 | -#include <stdio.h> |
4893 | - |
4894 | - |
4895 | -//#define DEBUG |
4896 | - |
4897 | -Timer::Timer (bool start_, bool verbose_) : verbose (verbose_) |
4898 | -{ |
4899 | - if (start_) start (); |
4900 | -} |
4901 | - |
4902 | -void Timer::start() |
4903 | -{ |
4904 | - startClock = clock(); |
4905 | -#ifndef WIN32 |
4906 | - struct timeval stime; |
4907 | - gettimeofday(&stime, NULL); |
4908 | - startTime=(double)stime.tv_sec+(1.e-6)*stime.tv_usec; |
4909 | - if (verbose) printf("Start time: %lf\n",startTime); |
4910 | -#else//WIN32 |
4911 | - if (verbose) printf("Start time: %lf\n",(double)startClock/CLOCKS_PER_SEC); |
4912 | -#endif |
4913 | - |
4914 | - suspended = false; |
4915 | - running = true; |
4916 | -} |
4917 | - |
4918 | -void Timer::end() |
4919 | -{ |
4920 | - endClock = clock(); |
4921 | -#ifndef WIN32 |
4922 | - struct timeval etime; |
4923 | - gettimeofday(&etime, NULL); |
4924 | - endTime=(double)etime.tv_sec+(1.e-6)*etime.tv_usec; |
4925 | - if (verbose) printf("End time: %lf\n",endTime); |
4926 | -#else///WIN32 |
4927 | - if (verbose) printf("End time: %lf\n",(double)endClock/CLOCKS_PER_SEC); |
4928 | -#endif |
4929 | - running = false; |
4930 | -} |
4931 | - |
4932 | -void Timer::suspend() |
4933 | -{ |
4934 | - suspendClock = clock(); |
4935 | -#ifndef WIN32 |
4936 | - struct timeval sustime; |
4937 | - gettimeofday(&sustime,NULL); |
4938 | - suspendTime = (double)sustime.tv_sec+(1.e-6)*sustime.tv_usec; |
4939 | - if (verbose) printf("Suspend time: %lf\n",suspendTime); |
4940 | -#else |
4941 | - if (verbose) printf("Suspend time: %lf\n",(double)suspendClock/CLOCKS_PER_SEC); |
4942 | -#endif |
4943 | - |
4944 | - suspended = true; |
4945 | -} |
4946 | - |
4947 | -void Timer::resume() |
4948 | -{ |
4949 | - clock_t resumeClock = clock(); |
4950 | - startClock = startClock +(resumeClock-suspendClock); |
4951 | -#ifndef WIN32 |
4952 | - struct timeval sustime; |
4953 | - gettimeofday(&sustime,NULL); |
4954 | - double resumeTime = (double)sustime.tv_sec+(1.e-6)*sustime.tv_usec; |
4955 | - if (verbose) printf("Resume time: %lf\n",resumeTime); |
4956 | - startTime = startTime +(resumeTime-suspendTime); |
4957 | - if (verbose) printf("New start Time: %lf\n",startTime); |
4958 | -#else//WIN32 |
4959 | - if (verbose) printf("Resume time: %lf\n",(double)resumeClock/CLOCKS_PER_SEC); |
4960 | -#endif |
4961 | - |
4962 | - suspended = false; |
4963 | -} |
4964 | - |
4965 | -double Timer::getClock() |
4966 | -{ |
4967 | - if (!suspended) |
4968 | - return (double)(endClock-startClock)/(double) CLOCKS_PER_SEC; |
4969 | - |
4970 | - return (double)(suspendClock-startClock)/(double) CLOCKS_PER_SEC; |
4971 | -} |
4972 | - |
4973 | - |
4974 | -double Timer::getTime() |
4975 | -{ |
4976 | -#ifndef WIN32 |
4977 | - if (!suspended) |
4978 | - return (double)(endTime-startTime); |
4979 | - |
4980 | - return (double)(suspendTime-startTime); |
4981 | -#else |
4982 | - return 0; |
4983 | -#endif |
4984 | -} |
4985 | - |
4986 | - |
4987 | -std::ostream& Timer::print(std::ostream& os) |
4988 | -{ |
4989 | -#ifndef WIN32 |
4990 | - os << "Duration (with System Time): " << getTime() << " s" << std::endl; |
4991 | -#endif |
4992 | - os << "Duration (with CPU Clocks): " << getClock() << " s" << std::endl; |
4993 | - |
4994 | - return os; |
4995 | -} |
4996 | - |
4997 | -bool Timer::isRunning() |
4998 | -{ |
4999 | - return running; |
5000 | -} |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ prune-test- dir-2013- 05-14T10- 10-52.723Z/ log.html
Log at: http://