diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-08-09 17:43:57 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-09 17:43:57 -0700 |
commit | 3b0f2cecffb9b4a8be63185394064adb989d5ac8 (patch) | |
tree | 78cfb711d4d0cdbc8955c5df5ad0e182b6211447 /test/common.js | |
parent | 665a4e4a1d666e69bafa6ccef248b68cea326c41 (diff) | |
download | android-node-v8-3b0f2cecffb9b4a8be63185394064adb989d5ac8.tar.gz android-node-v8-3b0f2cecffb9b4a8be63185394064adb989d5ac8.tar.bz2 android-node-v8-3b0f2cecffb9b4a8be63185394064adb989d5ac8.zip |
Fix dd command tests for Windows
Diffstat (limited to 'test/common.js')
-rw-r--r-- | test/common.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/common.js b/test/common.js index 45a11b392f..aea21b2cc2 100644 --- a/test/common.js +++ b/test/common.js @@ -52,6 +52,17 @@ exports.indirectInstanceOf = function(obj, cls) { }; +exports.ddCommand = function(filename, kilobytes) { + if (process.platform == 'win32') { + return 'fsutil.exe file createnew "' + filename + '" ' + (kilobytes * 1024); + } else { + var blocks = Integer(size / 1024); + return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; + } +}; + + + // Turn this off if the test should not check for global leaks. exports.globalCheck = true; |