diff --git a/.editorconfig b/.editorconfig index ccd32b0..f209fa5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ indent_size = 2 trim_trailing_whitespace = true charset = utf-8 +[*.d] +dfmt_split_operator_at_line_end = true + diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dd6e9d..826f671 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v0.3.0 + +* Rename module to pijamas. +* .empty for arrays, associative arrays and strings. + # v0.2.2 Versions v0.2.x must keep being source compatible with Pyjamas. diff --git a/README.md b/README.md index 1487ada..3b362a5 100644 --- a/README.md +++ b/README.md @@ -99,12 +99,22 @@ value. #### `U length(U)(U length, string file = __FILE__, size_t line = __LINE__);` Asserts for the `.length` property or function value to equal some value. + ```d [1, 2, 3, 4].should.have.length(4); "abcdefg".should.have.length(0); // ^^ - Throws an Exception "expected 'abcdefg' to have length of 0" ``` +#### `bool empty(string file = __FILE__, size_t line = __LINE__);` + +Asserts that the .lenght property or function value is equal to 0; + +```d +[].should.be.empty; +"".should.be.empty; +``` + #### `auto match(RegEx)(RegEx re, string file = __FILE__, size_t line = __LINE__);` Asserts for a string wrapped around the Assertion to match a regular expression. diff --git a/docs/changelog.md b/docs/changelog.md index a81f75e..558bcea 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,11 @@ layout: default title: Changelog --- +# v0.3.0 + +* Rename module to pijamas. +* .empty for arrays, associative arrays and strings. + # v0.2.2 Versions v0.2.x must keep being source compatible with Pyjamas. diff --git a/docs/index.md b/docs/index.md index da7cffb..e6dae03 100644 --- a/docs/index.md +++ b/docs/index.md @@ -103,12 +103,22 @@ value. #### `U length(U)(U length, string file = __FILE__, size_t line = __LINE__);` Asserts for the `.length` property or function value to equal some value. + ```d [1, 2, 3, 4].should.have.length(4); "abcdefg".should.have.length(0); // ^^ - Throws an Exception "expected 'abcdefg' to have length of 0" ``` +#### `bool empty(string file = __FILE__, size_t line = __LINE__);` + +Asserts that the .lenght property or function value is equal to 0; + +```d +[].should.be.empty; +"".should.be.empty; +``` + #### `auto match(RegEx)(RegEx re, string file = __FILE__, size_t line = __LINE__);` Asserts for a string wrapped around the Assertion to match a regular expression. diff --git a/docs/pyjamas.html b/docs/pijamas.html similarity index 92% rename from docs/pyjamas.html rename to docs/pijamas.html index e12c8ad..82bdcbd 100644 --- a/docs/pyjamas.html +++ b/docs/pijamas.html @@ -3,7 +3,7 @@ - pyjamas + pijamas