jscoverage で instrumented version の src tree を作る
jscoverage src src-cov
instrumentation の command を grunt 化する (grunt-shell を使うと便利)
shell:
| {} = 1 |
| S = (X) -> (Y) -> (x) -> X(x)(Y(x)) | |
| K = (X) -> (x) -> X | |
| I = (x) -> x | |
| Y = (f) -> ((x) -> f(x(x)))((x) -> f(x(x))) |
| integer procedure div(a, b); value a, b; | |
| integer a, b; | |
| if b = 0 then | |
| fault( `div by zero' , a) | |
| else | |
| begin integer q, r; | |
| q := 0; r := iabs(a); | |
| for r := r - iabs(b) while r ≥ 0 do q := q + 1; | |
| div := if a < 0 ≡ b > 0 then -q else q | |
| end div; |
| Function.apply.call(Function.call.apply, alert, [window, ['a']]); | |
| Function.apply.call.apply(Function.call.apply.call, [alert, function(){}(), 'a']); |
| var cutRoundedRect = function(ctx, radius, x, y, w, h) { | |
| var left = x; | |
| var top = y; | |
| var right = x + w; | |
| var bottom = y + h; | |
| ctx.globalCompositeOperation = 'destination-in'; | |
| ctx.fillStyle = 'black'; | |
| ctx.beginPath(); |
jscoverage で instrumented version の src tree を作る
jscoverage src src-cov
instrumentation の command を grunt 化する (grunt-shell を使うと便利)
shell:
| kt3k:groovy kt3k$ cat test2.groovy | |
| println 'a'*2 | |
| kt3k:groovy kt3k$ groovy test2.groovy | |
| aa | |
| kt3k:groovy kt3k$ cat test.groovy | |
| println 2*'a' | |
| kt3k:groovy kt3k$ groovy test.groovy | |
| Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.multiply() is applicable for argument types: (java.lang.String) values: [a] | |
| Possible solutions: multiply(java.lang.Number), multiply(java.lang.Character) | |
| groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.multiply() is applicable for argument types: (java.lang.String) values: [a] |
| set state to do shell script "kextstat | grep EasyTether | cat" | |
| if state is "" then | |
| display dialog "turning on EasyTether" | |
| do shell script "kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext/" with administrator privileges | |
| else | |
| display dialog "turning off EasyTether" | |
| do shell script "kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext/" with administrator privileges | |
| end if |
| #!/usr/bin/env python | |
| print 'test' | |
| # abc |
| #! /usr/bin/env php | |
| <?php | |
| echo 123; |