patch 8.1.1058: memory usage test may still fail on some systems
Problem: Memory usage test may still fail on some systems.
Solution: Use 98% of the lower limit. (Christian Brabandt)
diff --git a/src/testdir/test_memory_usage.vim b/src/testdir/test_memory_usage.vim
index 565a115..3775552 100644
--- a/src/testdir/test_memory_usage.vim
+++ b/src/testdir/test_memory_usage.vim
@@ -97,9 +97,11 @@
let after = s:monitor_memory_usage(vim.pid)
" Estimate the limit of max usage as 2x initial usage.
- call assert_inrange(before, 2 * before, after.max)
- " In this case, garbage collecting is not needed. The value might fluctuate
- " a bit, allow for 3% tolerance.
+ " The lower limit can fluctuate a bit, use 98%.
+ call assert_inrange(before * 98 / 100, 2 * before, after.max)
+
+ " In this case, garbage collecting is not needed.
+ " The value might fluctuate a bit, allow for 3% tolerance.
let lower = after.last * 97 / 100
let upper = after.last * 103 / 100
call assert_inrange(lower, upper, after.max)
diff --git a/src/version.c b/src/version.c
index 8a9d8b9..541a02f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -776,6 +776,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1058,
+/**/
1057,
/**/
1056,