diff options
-rw-r--r-- | cliff/tests/test_formatters_shell.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cliff/tests/test_formatters_shell.py b/cliff/tests/test_formatters_shell.py new file mode 100644 index 0000000..5d49e65 --- /dev/null +++ b/cliff/tests/test_formatters_shell.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +from six import StringIO + +from cliff.formatters import shell + +import mock + + +def test_shell_formatter(): + sf = shell.ShellFormatter() + c = ('a', 'b', 'c') + d = ('A', 'B', 'C') + expected = 'a="A"\nb="B"\n' + output = StringIO() + args = mock.Mock() + args.variables = ['a', 'b'] + args.prefix = '' + sf.emit_one(c, d, output, args) + actual = output.getvalue() + assert expected == actual |