-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zswang
committed
Nov 2, 2015
1 parent
7a9c2b9
commit 4efd40e
Showing
20 changed files
with
1,618 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
var assert = require('should'); | ||
var jpacks = require('../.'); | ||
var util = require('util'); | ||
|
||
var zlib = require('../schemas-extend/zlib'); | ||
zlib(jpacks); | ||
|
||
var printValue; | ||
function print(value) { | ||
printValue = value; | ||
} | ||
|
||
/*<remove>*/ | ||
// <!--jdists encoding="glob" pattern="./src/**/*.js" export="#files" /--> | ||
/*</remove>*/ | ||
|
||
/*<jdists encoding="jhtmls,regex" pattern="/~/g" replacement="--" data="#files" export="#example">*/ | ||
forEach(function (item) { | ||
!#{'describe("' + item + '", function () {'} | ||
<!~jdists import="#{item}?example*" /~> | ||
!#{'});'} | ||
}); | ||
<!~jdists import="schemas-extend/zlib.js?example*" /~> | ||
/*</jdists>*/ | ||
|
||
<!--jdists export="#pattern">/^\s*\*\s*@example\s*(.*)$/mg</jdists--> | ||
<!--jdists export="#replacement"> it("$1", function () {</jdists--> | ||
<!--jdists encoding="regex" import="#example" pattern="#pattern" replacement="#replacement" export="#example" /--> | ||
|
||
<!--jdists export="#pattern">/^\s*```js\s*$/mg</jdists--> | ||
<!--jdists export="#replacement"></jdists--> | ||
<!--jdists encoding="regex" import="#example" pattern="#pattern" replacement="#replacement" export="#example" /--> | ||
|
||
<!--jdists export="#pattern">/^\s*```\s*$/mg</jdists--> | ||
<!--jdists export="#replacement"> });</jdists--> | ||
<!--jdists encoding="regex" import="#example" pattern="#pattern" replacement="#replacement" export="#example" /--> | ||
|
||
<!--jdists export="#pattern">/console\.log/g</jdists--> | ||
<!--jdists export="#replacement">print</jdists--> | ||
<!--jdists encoding="regex" import="#example" pattern="#pattern" replacement="#replacement" export="#example" /--> | ||
|
||
<!--jdists export="#pattern">/\/\/ ->\s*(.*)/gm</jdists--> | ||
<!--jdists export="#replacement">assert.equal(printValue, '$1')</jdists--> | ||
<!--jdists encoding="regex" import="#example" pattern="#pattern" replacement="#replacement" export="#example" /--> | ||
/*<jdists import="#example"/>*/ |
Oops, something went wrong.