1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into devel

This commit is contained in:
jsteemann 2016-06-02 12:00:50 +02:00
commit ec79aba2fd
2 changed files with 48 additions and 0 deletions

View File

@ -42,6 +42,11 @@
* License: PCRE [BSD 3-Clause license](https://github.com/v8/v8/blob/5.0.71.39/test/mjsunit/third_party/regexp-pcre.js)
* License: object-keys [BSD-style 3-Clause license](https://github.com/v8/v8/blob/5.0.71.39/test/mjsunit/third_party/object-keys.js)
### RocksDB 4.8.0
* Project Home: https://github.com/facebook/rocksdb
* License: [BSD License](https://github.com/facebook/rocksdb/blob/master/LICENSE)
### ICU 54.1
* Project Home: http://site.icu-project.org/

View File

@ -78,6 +78,24 @@ function ahuacatlStringFunctionsTestSuite () {
testRegex : function () {
var values = [
// empty values
["", "", true],
["", "^", true],
["", "$", true],
["", "^$", true],
["", "^.*$", true],
["", "^.+$", false],
["", ".", false],
["", ".?", true],
[" ", ".?", true],
[" ", ".+", true],
[" ", ".$", true],
[" ", "^.", true],
[" ", ".$", true],
[" ", "^.$", true],
[" ", "^.{1,}$", true],
[" ", "^.{2,}$", false],
// whole words
["the quick brown fox", "the", true],
["the quick brown fox", "quick", true],
@ -89,6 +107,7 @@ function ahuacatlStringFunctionsTestSuite () {
["the quick brown fox", "THE", false],
["the quick brown fox", "foxx", false],
["the quick brown fox", "hasi", false],
["the quick brown fox", "number", false],
// anchored
["the quick brown fox", "^the", true],
@ -153,6 +172,8 @@ function ahuacatlStringFunctionsTestSuite () {
["the quick brown fox", " ", true],
["the quick brown fox", " ", false],
["the quick brown fox", "", true],
["the quick brown fox", "number one", false],
["the quick brown fox", "123", false],
// wildcards
["the quick brown fox", "the.*fox", true],
@ -171,6 +192,28 @@ function ahuacatlStringFunctionsTestSuite () {
["the quick brown fox", "^t.*(fox|wolf)$", true],
["the quick brown fox", "^t.*(fo|wolf)x$", true],
["the quick brown fox", "^t.*(fo|wolf)xx", false],
// line breaks
["the quick\nbrown\nfox", "the.*fox", false],
["the quick\nbrown\nfox", "the(.|\n)*fox", true],
["the quick\nbrown\nfox", "^the.*fox$", false],
["the quick\nbrown\nfox", "^the(.|\n)*fox$", true],
["the quick\nbrown\nfox", "the.*fox$", false],
["the quick\nbrown\nfox", "the(.|\n)*fox$", true],
["the quick\nbrown\nfox", "^the.*fox$", false],
["the quick\nbrown\nfox", "^the(.|\n)*fox$", true],
["the quick\nbrown\nfox", "^the.*dog$", false],
["the quick\nbrown\nfox", "^the(.|\n)*dog$", false],
["the quick\nbrown\nfox", "brown fox", false],
["the quick\nbrown\nfox", "brown.fox", false],
["the quick\nbrown\nfox", "brown(.|\n)fox", true],
["the quick\nbrown\nfox", "brown\\nfox", true],
["the quick\nbrown\nfox", "quick.brown", false],
["the quick\nbrown\nfox", "quick(.|\n)brown", true],
["the quick\r\nbrown\nfox", "quick.brown", false],
["the quick\r\nbrown\nfox", "quick(.|\r\n)brown", true],
["the quick\r\nbrown\nfox", "quick\\r\\nbrown", true],
["the quick\r\nbrown\nfox", "quick\\r\\red", false]
];
values.forEach(function(v) {