From 5e4b4e1c1142a747fa1ba6286639b4d82d80f4ce Mon Sep 17 00:00:00 2001
From: Igor Pashev <pashev.igor@gmail.com>
Date: Tue, 24 Mar 2015 22:06:35 +0300
Subject: Eat trailing spaces in sun mode

---
 tests/scripts/features/sun-trailing-spaces | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 tests/scripts/features/sun-trailing-spaces

(limited to 'tests/scripts/features/sun-trailing-spaces')

diff --git a/tests/scripts/features/sun-trailing-spaces b/tests/scripts/features/sun-trailing-spaces
new file mode 100644
index 0000000..347e6ce
--- /dev/null
+++ b/tests/scripts/features/sun-trailing-spaces
@@ -0,0 +1,31 @@
+#                                                                    -*-perl-*-
+$description = "In SunOS mode strip trailing spaces";
+
+$details = "";
+
+# !!! Note the spaces and tabs after hello !!!
+run_make_test('
+
+var_with_trailing_space = hello 
+var_with_trailing_tab = hello	
+var_with_trailing_tab_space_tab = hello	 	
+
+space:
+	@echo "$(var_with_trailing_space)world"
+tab:
+	@echo "$(var_with_trailing_tab)world"
+tab_space_tab:
+	@echo "$(var_with_trailing_tab_space_tab)world"
+
+',
+'space',
+"hello world");
+
+run_make_test(undef, '--sun space', "helloworld");
+run_make_test(undef, '--sun tab', "helloworld");
+run_make_test(undef, '--sun tab_space_tab', "helloworld");
+run_make_test(undef, 'tab', "hello\tworld");
+run_make_test(undef, 'tab_space_tab', "hello\t \tworld");
+
+# This tells the test driver that the perl test script executed properly.
+1;
-- 
cgit v1.2.3