Browse Source

add CLEAN sections to tests, and ignore build artefacts

Remi Collet 7 years ago
parent
commit
f4c008aebd
9 changed files with 42 additions and 7 deletions
  1. 2 0
      .gitignore
  2. 4 0
      tests/005.phpt
  3. 6 1
      tests/010.phpt
  4. 5 1
      tests/011.phpt
  5. 5 1
      tests/012.phpt
  6. 5 1
      tests/013.phpt
  7. 5 1
      tests/014.phpt
  8. 5 1
      tests/015.phpt
  9. 5 1
      tests/016.phpt

+ 2 - 0
.gitignore

@@ -20,6 +20,7 @@ include
 install-sh
 libtool
 ltmain.sh
+ltmain.sh.backup
 Makefile
 Makefile.fragments
 Makefile.global
@@ -34,6 +35,7 @@ tests/*/*.php
 tests/*/*.exp
 tests/*/*.log
 tests/*/*.sh
+tmp-php.ini
 .idea
 cmake-build-debug
 CMakeLists.txt

+ 4 - 0
tests/005.phpt

@@ -11,5 +11,9 @@ $filePath = $excel->fileName('tutorial01.xlsx')
     ->output();
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
 string(23) "./tests/tutorial01.xlsx"

+ 6 - 1
tests/010.phpt

@@ -21,6 +21,11 @@ $fileTwo = $excel_two->fileName('tutorial02.xlsx')
     ->output();
 var_dump($fileOne,$fileTwo);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+@unlink(__DIR__ . '/tutorial02.xlsx');
+?>
 --EXPECT--
 string(23) "./tests/tutorial01.xlsx"
-string(23) "./tests/tutorial02.xlsx"
+string(23) "./tests/tutorial02.xlsx"

+ 5 - 1
tests/011.phpt

@@ -19,5 +19,9 @@ $filePath = $fileObject->header(['name', 'age'])
 
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
-string(23) "./tests/tutorial01.xlsx"
+string(23) "./tests/tutorial01.xlsx"

+ 5 - 1
tests/012.phpt

@@ -19,5 +19,9 @@ $filePath = $fileObject->header(['name', 'age'])
 
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
-string(23) "./tests/tutorial01.xlsx"
+string(23) "./tests/tutorial01.xlsx"

+ 5 - 1
tests/013.phpt

@@ -19,5 +19,9 @@ $filePath = $textFile->output();
 
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
-string(23) "./tests/tutorial01.xlsx"
+string(23) "./tests/tutorial01.xlsx"

+ 5 - 1
tests/014.phpt

@@ -22,5 +22,9 @@ $filePath = $freeFile->output();
 
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
-string(23) "./tests/tutorial01.xlsx"
+string(23) "./tests/tutorial01.xlsx"

+ 5 - 1
tests/015.phpt

@@ -19,5 +19,9 @@ $filePath = $excel->fileName("tutorial01.xlsx")
 
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
-string(23) "./tests/tutorial01.xlsx"
+string(23) "./tests/tutorial01.xlsx"

+ 5 - 1
tests/016.phpt

@@ -13,5 +13,9 @@ $filePath = $excel->fileName("tutorial01.xlsx")
 
 var_dump($filePath);
 ?>
+--CLEAN--
+<?php
+@unlink(__DIR__ . '/tutorial01.xlsx');
+?>
 --EXPECT--
-string(23) "./tests/tutorial01.xlsx"
+string(23) "./tests/tutorial01.xlsx"