From 5009a9d0f3606fc08a80ec0d59076d8dc48d2f25 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Tue, 13 Sep 2016 16:11:47 +0100 Subject: Import patches-unapplied version 2.1.5-0ubuntu1 to ubuntu/yakkety-proposed Imported using git-ubuntu import. Changelog parent: 0f7cef5b52162d1ebb31a738bd8fc9febe1fbda6 New changelog entries: * New upstream release (LP: #1603581) - d/patches/disable-auto-update.patch: - The new version introduces auto-updating of the agent to its latest version via an internal mechanism; disable this - d/patches/fix_shebangs.patch: - Dropped in favour of the dh_python3 --shebang option. - Refreshed d/patches/disable_udev_overrides.patch --- tests/utils/test_shell_util.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/utils/test_shell_util.py') diff --git a/tests/utils/test_shell_util.py b/tests/utils/test_shell_util.py index aa89121..57e6c33 100644 --- a/tests/utils/test_shell_util.py +++ b/tests/utils/test_shell_util.py @@ -15,15 +15,12 @@ # # Requires Python 2.4+ and Openssl 1.0+ # -# Implements parts of RFC 2131, 1541, 1497 and -# http://msdn.microsoft.com/en-us/library/cc227282%28PROT.10%29.aspx -# http://msdn.microsoft.com/en-us/library/cc227259%28PROT.13%29.aspx from tests.tools import * import uuid import unittest import os -import azurelinuxagent.utils.shellutil as shellutil +import azurelinuxagent.common.utils.shellutil as shellutil import test class TestrunCmd(AgentTestCase): @@ -38,5 +35,10 @@ class TestrunCmd(AgentTestCase): err = shellutil.run_get_output(u"ls 我") self.assertNotEquals(0, err[0]) + def test_shellquote(self): + self.assertEqual("\'foo\'", shellutil.quote("foo")) + self.assertEqual("\'foo bar\'", shellutil.quote("foo bar")) + self.assertEqual("'foo'\\''bar'", shellutil.quote("foo\'bar")) + if __name__ == '__main__': unittest.main() -- cgit v1.2.3