<commit_before>--TEST--
message body append error
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php
echo "Test\n";

$file = new http\Message\Body(fopen(__FILE__, "r"));
try {
	$file->append("nope");
} catch (Exception $e) {
	echo $e, "\n";
}

?>
DONE
--EXPECTF--
Test
exception 'http\Exception\RuntimeException' with message 'http\Message\Body::append(): Failed to append 4 bytes to body; wrote 0' in /home/mike/src/ext-http.git/tests/messagebody003.php:6
Stack trace:
#0 %s(%d): http\Message\Body->append('nope')
#1 {main}
DONE
<commit_msg>fix expectation<commit_after>--TEST--
message body append error
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php
echo "Test\n";

$file = new http\Message\Body(fopen(__FILE__, "r"));
try {
	$file->append("nope");
} catch (Exception $e) {
	echo $e, "\n";
}

?>
DONE
--EXPECTF--
Test
exception 'http\Exception\RuntimeException' with message 'http\Message\Body::append(): Failed to append 4 bytes to body; wrote 0' in %s:%d
Stack trace:
#0 %s(%d): http\Message\Body->append('nope')
#1 {main}
DONE

{'fraction_non_alphanumeric': 0.20305052430886558, 'fraction_numerical': 0.011439466158245948, 'mean_word_length': 4.384615384615385, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '632188', 'n_tokens_mistral': 399, 'n_tokens_neox': 392, 'n_words': 105}