From c11024b3b3532ef7eb80df7d55c8b2fcdc20ce93 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 26 May 2013 14:41:45 -0400 Subject: [SV #38945] Copy the entire buffer back when overwriting CR --- tests/scripts/misc/bs-nl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/scripts/misc') diff --git a/tests/scripts/misc/bs-nl b/tests/scripts/misc/bs-nl index aa7661e..4fc3f63 100644 --- a/tests/scripts/misc/bs-nl +++ b/tests/scripts/misc/bs-nl @@ -114,10 +114,15 @@ t:; @$(call f,"a \ my $m1 = get_tmpfile(); open(MAKEFILE, "> $m1"); binmode(MAKEFILE); -print MAKEFILE "FOO = foo \\\r\nbar\nall: ; \@echo \$(FOO)\n"; +print MAKEFILE "FOO = foo \\\r\n"; close(MAKEFILE); -run_make_with_options($m1, '', get_logfile()); +my $m2 = get_tmpfile(); +open(MAKEFILE, "> $m2"); +print MAKEFILE "include $m1\ndefine BAR\nall: ; \@echo \$(FOO) bar\nendef\n\$(eval \$(BAR))\n"; +close(MAKEFILE); + +run_make_with_options($m2, '', get_logfile()); compare_output("foo bar\n", get_logfile(1)); -- cgit v1.2.3