license message bugfix and test
This commit is contained in:
parent
c7adb56e38
commit
2e68cc095b
4 changed files with 22 additions and 4 deletions
|
|
@ -20,10 +20,10 @@
|
|||
contrib.license: Copyright notice and text of GPLv3
|
||||
"""
|
||||
|
||||
from ..globalvars import g
|
||||
from ..globalvars import gc
|
||||
|
||||
warning = f"""
|
||||
{g.proj_name} Copyright (C) {g.Cdates} by {g.author} {g.email}. This
|
||||
{gc.proj_name} Copyright (C) {gc.Cdates} by {gc.author} {gc.email}. This
|
||||
program comes with ABSOLUTELY NO WARRANTY. This is free software, and
|
||||
you are welcome to redistribute it under certain conditions.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
March 2023
|
||||
April 2023
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
13.3.dev42
|
||||
13.3.dev43
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ class TestSuiteHelp(TestSuiteBase):
|
|||
cmd_group = (
|
||||
('usage', (1,'usage message',[])),
|
||||
('version', (1,'version message',[])),
|
||||
('license', (1,'license message',[])),
|
||||
('helpscreens', (1,'help screens', [])),
|
||||
('longhelpscreens', (1,'help screens (--longhelp)',[])),
|
||||
('show_hash_presets', (1,'info screen (--show-hash-presets)',[])),
|
||||
|
|
@ -118,6 +119,23 @@ class TestSuiteHelp(TestSuiteBase):
|
|||
t.expect('MMGEN-TOOL version')
|
||||
return t
|
||||
|
||||
def license(self):
|
||||
lsave = os.getenv('MMGEN_NO_LICENSE')
|
||||
os.environ['MMGEN_NO_LICENSE'] = ''
|
||||
t = self.spawn(f'mmgen-walletconv',['--stdout','--in-fmt=hex','--out-fmt=hex'])
|
||||
t.expect('to continue: ', 'w')
|
||||
t.expect('TERMS AND CONDITIONS') # start of GPL text
|
||||
if cfg.pexpect_spawn:
|
||||
t.send('G')
|
||||
t.expect('return for a fee.') # end of GPL text
|
||||
if cfg.pexpect_spawn:
|
||||
t.send('q')
|
||||
t.expect('to continue: ', 'c')
|
||||
t.expect('data: ','beadcafe'*4 + '\n')
|
||||
t.expect('to confirm: ', 'YES\n')
|
||||
os.environ['MMGEN_NO_LICENSE'] = lsave
|
||||
return t
|
||||
|
||||
def spawn_chk_expect(self,*args,**kwargs):
|
||||
expect = kwargs.pop('expect')
|
||||
t = self.spawn(*args,**kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue