summaryrefslogtreecommitdiff
path: root/jstests/tool/files1.js
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2010-06-29 14:18:02 -0400
committerMathias Stearn <mathias@10gen.com>2010-06-29 14:18:02 -0400
commit1004452bfd40e054c51a783bc65baa3463a1b584 (patch)
treecedb727a8ec2563448f3128e75094b28e5c9888f /jstests/tool/files1.js
parent91f745ac64c3993bb3db743ea415115059a99346 (diff)
downloadmongo-1004452bfd40e054c51a783bc65baa3463a1b584.tar.gz
fix for windows
Diffstat (limited to 'jstests/tool/files1.js')
-rw-r--r--jstests/tool/files1.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/jstests/tool/files1.js b/jstests/tool/files1.js
index a73cdc04718..9098c4597cc 100644
--- a/jstests/tool/files1.js
+++ b/jstests/tool/files1.js
@@ -4,8 +4,12 @@ t = new ToolTest( "files1" )
db = t.startDB();
-t.runTool( "files" , "-d" , t.baseName , "put" , 'mongod' );
-md5 = md5sumFile('mongod');
+filename = 'mongod'
+if ( _isWindows() )
+ filename += '.exe'
+
+t.runTool( "files" , "-d" , t.baseName , "put" , filename );
+md5 = md5sumFile(filename);
file_obj = db.fs.files.findOne()
md5_stored = file_obj.md5;
@@ -19,7 +23,7 @@ try {
runProgram('mkdir', t.ext);
}
-t.runTool( "files" , "-d" , t.baseName , "get" , 'mongod' , '-l' , t.extFile );
+t.runTool( "files" , "-d" , t.baseName , "get" , filename , '-l' , t.extFile );
md5 = md5sumFile(t.extFile);
assert.eq( md5 , md5_stored , "B" );