Added tests for missing output.name and output.type.

This commit is contained in:
Salvador E. Tropea 2020-05-26 13:36:49 -03:00
parent 1d85befd9b
commit e3cddb280a
3 changed files with 72 additions and 0 deletions

View File

@ -9,6 +9,8 @@ Tests various errors in the config file
- Incorrect name
- Inner.1, but no inner layers
- Inner_1 (malformed)
- No output.name
- No output.type
For debug information use:
pytest-3 --log-cli-level debug
@ -72,3 +74,17 @@ def test_wrong_layer_3():
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Malformed inner layer name: Inner_1,")
ctx.clean_up()
def test_no_name():
ctx = context.TestContext('ErrorNoName', '3Rs', 'error_no_name', None)
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Output needs a name")
ctx.clean_up()
def test_no_type():
ctx = context.TestContext('ErrorNoType', '3Rs', 'error_no_type', None)
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Output 'PDF' needs a type")
ctx.clean_up()

View File

@ -0,0 +1,28 @@
kiplot:
version: 1
outputs:
- comment: "PDF files"
type: pdf
dir: PDF
options:
exclude_edge_layer: false
exclude_pads_from_silkscreen: false
use_aux_axis_as_origin: false
plot_sheet_reference: false
plot_footprint_refs: true
plot_footprint_values: true
force_plot_invisible_refs_vals: false
tent_vias: true
check_zone_fills: true
# PDF options
drill_marks: small
mirror_plot: false
negative_plot: false
line_width: 0.01
layers:
- layer: F.Cu
suffix: F_Cu
- layer: F.Bogus
suffix: B_Silks

View File

@ -0,0 +1,28 @@
kiplot:
version: 1
outputs:
- name: PDF
comment: "PDF files"
dir: PDF
options:
exclude_edge_layer: false
exclude_pads_from_silkscreen: false
use_aux_axis_as_origin: false
plot_sheet_reference: false
plot_footprint_refs: true
plot_footprint_values: true
force_plot_invisible_refs_vals: false
tent_vias: true
check_zone_fills: true
# PDF options
drill_marks: small
mirror_plot: false
negative_plot: false
line_width: 0.01
layers:
- layer: F.Cu
suffix: F_Cu
- layer: F.Bogus
suffix: B_Silks