| 1 |
#!/usr/bin/env python3 |
| 2 |
# |
| 3 |
# Copyright (c) 2021-2023 Paul Mattes. |
| 4 |
# All rights reserved. |
| 5 |
# |
| 6 |
# Redistribution and use in source and binary forms, with or without |
| 7 |
# modification, are permitted provided that the following conditions are met: |
| 8 |
# * Redistributions of source code must retain the above copyright |
| 9 |
# notice, this list of conditions and the following disclaimer. |
| 10 |
# * Redistributions in binary form must reproduce the above copyright |
| 11 |
# notice, this list of conditions and the following disclaimer in the |
| 12 |
# documentation and/or other materials provided with the distribution. |
| 13 |
# * Neither the names of Paul Mattes nor the names of his contributors |
| 14 |
# may be used to endorse or promote products derived from this software |
| 15 |
# without specific prior written permission. |
| 16 |
# |
| 17 |
# THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 |
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 |
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 20 |
# EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 22 |
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 23 |
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 |
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 25 |
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 26 |
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
# |
| 28 |
# tcl3270 basic command-line tests |
| 29 |
|
| 30 |
import unittest |
| 31 |
import sys |
| 32 |
import Common.Test.cti as cti |
| 33 |
|
| 34 |
@unittest.skipIf(sys.platform == "darwin", "macOS does not like tcl") |
| 35 |
class TestTcl3270BasicCmdline(cti.cti): |
| 36 |
|
| 37 |
# tcl3270 -v and -help test |
| 38 |
def test_tcl3270_v_help(self): |
| 39 |
self.check_dash_v('tcl3270', check_tls = False) |
| 40 |
self.check_help('tcl3270') |
| 41 |
self.check_bad('tcl3270', extra = '--') |
| 42 |
self.check_bad2('tcl3270', extra = '--') |
| 43 |
self.check_toomany('tcl3270', extra = '--') |
| 44 |
self.check_incomplete('tcl3270', extra = '--') |
| 45 |
|
| 46 |
if __name__ == '__main__': |
| 47 |
unittest.main() |