Added tests for missing styles and logos.

This commit is contained in:
SET 2020-08-12 19:49:27 -03:00
parent 270ab0b70e
commit 1dcda68cbc
7 changed files with 77 additions and 1 deletions

View File

@ -492,3 +492,24 @@ def test_error_int_bom_no_field():
assert ctx.search_err("Missing or empty `field` in columns list")
ctx.clean_up()
def test_error_int_bom_miss_logo():
ctx = context.TestContextSCH('test_error_int_bom_miss_logo', 'links', 'error_int_bom_miss_logo', '')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Missing logo file")
ctx.clean_up()
def test_error_int_bom_miss_style():
ctx = context.TestContextSCH('test_error_int_bom_miss_style', 'links', 'error_int_bom_miss_style', '')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Missing style file")
ctx.clean_up()
def test_error_int_bom_unknown_style():
ctx = context.TestContextSCH('test_error_int_bom_unknown_style', 'links', 'error_int_bom_unknown_style', '')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Unknown style .?bogus.?")
ctx.clean_up()

View File

@ -0,0 +1,13 @@
# Example KiPlot config file
kiplot:
version: 1
outputs:
- name: 'bom_internal'
comment: "Bill of Materials in CSV format"
type: bom
dir: BoM
options:
html:
logo: 'bogus'

View File

@ -0,0 +1,13 @@
# Example KiPlot config file
kiplot:
version: 1
outputs:
- name: 'bom_internal'
comment: "Bill of Materials in CSV format"
type: bom
dir: BoM
options:
html:
style: 'bogus'

View File

@ -0,0 +1,13 @@
# Example KiPlot config file
kiplot:
version: 1
outputs:
- name: 'bom_internal'
comment: "Bill of Materials in CSV format"
type: bom
dir: BoM
options:
xlsx:
style: 'bogus'

View File

@ -10,3 +10,4 @@ outputs:
options:
html:
title: ''
style: ''

View File

@ -0,0 +1,15 @@
# Example KiPlot config file
kiplot:
version: 1
outputs:
- name: 'bom_internal'
comment: "Bill of Materials in HTML format"
type: bom
dir: BoM
options:
html:
logo: 'bogus'
title: ''
hide_pcb_info: true
hide_stats_info: true

View File

@ -11,4 +11,4 @@ outputs:
format: XLSX
xlsx:
title: ''
style: ''