mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-01-11 19:09:35 +00:00
Fix #62: Allow clear sig variant without new line in tests
This commit is contained in:
parent
ced3b06792
commit
6eda368b55
2 changed files with 8 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
|||
--TEST--n
|
||||
--TEST--
|
||||
sign a text with sigmode SIG_MODE_CLEAR
|
||||
--SKIPIF--
|
||||
<?php if(!class_exists("gnupg")) die("skip"); ?>
|
||||
|
|
@ -20,7 +20,8 @@ $tmp = false;
|
|||
$ret = $gpg->verify($ret, false, $tmp);
|
||||
|
||||
var_dump($ret);
|
||||
var_dump($tmp);
|
||||
// Some distros like Arch Linux applied patch to gnupg 2.4.8 removing the new line - see GH-62
|
||||
var_dump($tmp == "foo bar\n" || $tmp == "foo bar");
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
|
|
@ -38,8 +39,7 @@ array(1) {
|
|||
int(0)
|
||||
}
|
||||
}
|
||||
string(8) "foo bar
|
||||
"
|
||||
bool(true)
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
--TEST--n
|
||||
--TEST--
|
||||
sign a text with sigmode SIG_MODE_CLEAR
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gnupg")) die("skip"); ?>
|
||||
|
|
@ -18,7 +18,8 @@ $tmp = false;
|
|||
$ret = gnupg_verify($gpg, $ret, false, $tmp);
|
||||
|
||||
var_dump($ret);
|
||||
var_dump($tmp);
|
||||
// Some distros like Arch Linux applied patch to gnupg 2.4.8 removing the new line - see GH-62
|
||||
var_dump($tmp == "foo bar\n" || $tmp == "foo bar");
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
|
|
@ -36,8 +37,7 @@ array(1) {
|
|||
int(0)
|
||||
}
|
||||
}
|
||||
string(8) "foo bar
|
||||
"
|
||||
bool(true)
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue