Added a test for a bogus output type.

This commit is contained in:
Salvador E. Tropea 2020-05-25 20:00:59 -03:00
parent 5a23fe2b37
commit cc4d942111
2 changed files with 21 additions and 1 deletions

View File

@ -18,7 +18,7 @@ sys.path.insert(0, os.path.dirname(prev_dir))
# Utils import
from utils import context
sys.path.insert(0, os.path.dirname(prev_dir))
from kiplot.misc import (EXIT_BAD_ARGS)
from kiplot.misc import (EXIT_BAD_ARGS, EXIT_BAD_CONFIG)
POS_DIR = 'positiondir'
@ -70,3 +70,14 @@ def test_skip_pre_and_outputs_4():
assert ctx.search_err('Unknown action to skip: bogus')
ctx.clean_up()
def test_unknown_out():
prj = 'simple_2layer'
ctx = context.TestContext('UnknownOut', prj, 'unknown_out', POS_DIR)
ctx.run(EXIT_BAD_CONFIG)
ctx.dont_expect_out_file(ctx.get_pos_both_csv_filename())
assert ctx.search_err("Unknown output type 'bogus'")
ctx.clean_up()

View File

@ -0,0 +1,9 @@
kiplot:
version: 1
outputs:
- name: Test_Unknown
comment: "Testing an unknown type"
type: bogus
dir: FooBar