ソースを参照

Use $FindBin::Bin to allow 01-driver.t to be run from any dir

Daniel Gempesaw 10 年 前
コミット
fb4116a1ea
1 ファイル変更2 行追加2 行削除
  1. 2 2
      t/01-driver.t

+ 2 - 2
t/01-driver.t

@@ -524,8 +524,8 @@ UPLOAD: {
     }
 
     #In the case this is not mocked, it tests a real issue (.. in paths), if not, it makes sure the zip/base64 bits at least don't make us explode.
-    like( my $path2 = $fake_driver->upload_file('t/uploadTest'),qr/uploadTest$/,'upload_file: zip/base64 branch' );
-    like( my $path3 = $fake_driver->upload_file('t/../t/uploadTest'),qr/uploadTest$/,'upload_file: zip/base64 branch with .. in path' );
+    like( my $path2 = $fake_driver->upload_file($FindBin::Bin . '/uploadTest'),qr/uploadTest$/,'upload_file: zip/base64 branch' );
+    like( my $path3 = $fake_driver->upload_file($FindBin::Bin . '/../t/uploadTest'),qr/uploadTest$/,'upload_file: zip/base64 branch with .. in path' );
     unlike( $path3,qr/\.\./,'upload_file: zip/base64 branch with .. in path' );
     ok(-f $path2) if $harness->record;
     ok(-f $path3) if $harness->record;