You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2017/04/10 15:32:59 UTC
[1/2] brooklyn-docs git commit: Improve test-entities matcher docs,
for regex
Repository: brooklyn-docs
Updated Branches:
refs/heads/master 57746af03 -> 8c15d3207
Improve test-entities matcher docs, for regex
See discussion in https://github.com/apache/brooklyn-server/pull/589
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/62a86ce1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/62a86ce1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/62a86ce1
Branch: refs/heads/master
Commit: 62a86ce178bfc14fc6a4c6df19134c252b743115
Parents: 57746af
Author: Aled Sage <al...@gmail.com>
Authored: Mon Apr 10 16:11:21 2017 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Mon Apr 10 16:31:48 2017 +0100
----------------------------------------------------------------------
guide/yaml/test/test-entities.md | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/62a86ce1/guide/yaml/test/test-entities.md
----------------------------------------------------------------------
diff --git a/guide/yaml/test/test-entities.md b/guide/yaml/test/test-entities.md
index 4187c35..37604a1 100644
--- a/guide/yaml/test/test-entities.md
+++ b/guide/yaml/test/test-entities.md
@@ -165,6 +165,13 @@ The following conditions are provided by those test entities above that include
- `equals` - a synonym for `isEqualTo`
- `notEqual` - asserts that the actual value does not equal the expected value.
- `matches` - asserts that the actual value matches a [regex pattern](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html?is-external=true), for example `".*hello.*"`.
+ Note that regular expressions follow the Java defaults, e.g. for [line terminators](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#lt).
+ One can use `"(?m)"` for multi-line mode (so that `^` and `$` also match just after/before line terminators,
+ rather than just the start/end of the entire input sequence). The dotall mode, set with `"(?s)"`, can also
+ be useful (so that `.` matches any character, including line terminators).
+- `containsMatch` - asserts that the value contains a string that matches a regex. It follow the behaviour of
+ the [Matcher.find() method](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html#find()).
+ This can be useful for simplifying matching in multi-line input.
- `contains` - asserts that the actual value contains the supplied value
- `isEmpty` - asserts that the actual value is an empty string
- `notEmpty` - asserts that the actual value is a non empty string
[2/2] brooklyn-docs git commit: This closes #165
Posted by al...@apache.org.
This closes #165
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/8c15d320
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/8c15d320
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/8c15d320
Branch: refs/heads/master
Commit: 8c15d3207a2453483dbfe9f8860dab8e6f28c124
Parents: 57746af 62a86ce
Author: Aled Sage <al...@gmail.com>
Authored: Mon Apr 10 16:32:47 2017 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Mon Apr 10 16:32:47 2017 +0100
----------------------------------------------------------------------
guide/yaml/test/test-entities.md | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------