summaryrefslogtreecommitdiffstats
path: root/dbase-tests.patch
blob: f8b14cc2965ca9420f0d6748def039f29f39f225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From d7dce1639a9d989a498c967d8e716c7cbb918a05 Mon Sep 17 00:00:00 2001
From: "Christoph M. Becker" <cmbecker69@gmx.de>
Date: Thu, 23 Jun 2022 00:16:37 +0200
Subject: [PATCH] Ensure the clean section won't bork

If the file already has been deleted, or never have been created in the
first place, `unlink()` would throw a warning, and the test case might
be marked as borked.  We silence the call to avoid that.
---
 tests/002.phpt                  | 2 +-
 tests/dbase_create_error_8.phpt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/002.phpt b/tests/002.phpt
index 30ac6bb..759957a 100644
--- a/tests/002.phpt
+++ b/tests/002.phpt
@@ -56,5 +56,5 @@ Done
 <?php
 $file = dirname(__FILE__)."/002.dbf";
 
-unlink($file);
+@unlink($file);
 ?>
diff --git a/tests/dbase_create_error_8.phpt b/tests/dbase_create_error_8.phpt
index e2a0b4c..5d6e3bd 100644
--- a/tests/dbase_create_error_8.phpt
+++ b/tests/dbase_create_error_8.phpt
@@ -148,5 +148,5 @@ bool(false)
 <?php
 define('FILENAME', __DIR__ . DIRECTORY_SEPARATOR . 'dbase_create_error.dbf');
 
-unlink(FILENAME);
+@unlink(FILENAME);
 ?>
From 89fdec1c6c9ea3b6284973cb5459d0ef3e5ef8bd Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 21 Jul 2023 14:45:36 +0200
Subject: [PATCH] relax test for 8.3 bool vs false in error message

---
 tests/bug78668_8.phpt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/bug78668_8.phpt b/tests/bug78668_8.phpt
index 0657e51..811dfe1 100644
--- a/tests/bug78668_8.phpt
+++ b/tests/bug78668_8.phpt
@@ -18,5 +18,5 @@ try {
 ===DONE===
 --EXPECTF--
 Warning: dbase_open(): unable to open database %s on line %d
-dbase_get_header_info(): Argument #1 ($database) must be of type resource, bool given
+dbase_get_header_info(): Argument #1 ($database) must be of type resource, %s given
 ===DONE===