Permalink
Browse files

Generate fixtures more effectively, with -O instead of eval

  • Loading branch information...
1 parent f96190b commit 0a2b519672a99b944055bf32537190e4ae761d09 @isaacs committed Jul 5, 2015
Showing with 8 additions and 7 deletions.
  1. +0 −1 .gitignore
  2. +8 −6 test/00-setup.js
View
@@ -1,5 +1,4 @@
.*.swp
-test/a/
node_modules/*
v8.log
profile.txt
View
@@ -107,12 +107,14 @@ var fs = require("fs")
globs.forEach(function (pattern) {
tap.test("generate fixture " + pattern, function (t) {
- var cmd = "shopt -s globstar && " +
- "shopt -s extglob && " +
- "shopt -s nullglob && " +
- // "shopt >&2; " +
- "eval \'for i in " + pattern + "; do echo $i; done\'"
- var cp = spawn("bash", ["-c", cmd], { cwd: fixtureDir })
+ var opts = [
+ "-O", "globstar",
+ "-O", "extglob",
+ "-O", "nullglob",
+ "-c",
+ "for i in " + pattern + "; do echo $i; done"
+ ]
+ var cp = spawn("bash", opts, { cwd: fixtureDir })
var out = []
cp.stdout.on("data", function (c) {
out.push(c)

0 comments on commit 0a2b519

Please sign in to comment.