Added tests for errors in the libraries components fields

This commit is contained in:
SET 2020-08-14 15:58:00 -03:00
parent 5e55f661f8
commit 1767e66220
6 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,27 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L l3:R R1
U 1 1 5EBE8A2E
P 3500 2200
F 0 "R1" H 3570 2246 50 0000 L CNN
F 1 "100" H 3570 2155 50 0000 L CNN
F 2 "Resistor_SMD:R_0805_2012Metric" V 3430 2200 50 0001 C CNN
F 3 "~" H 3500 2200 50 0001 C CNN
1 3500 2200
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,27 @@
EESchema Schematic File Version 4
EELAYER 30 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L l4:R R1
U 1 1 5EBE8A2E
P 3500 2200
F 0 "R1" H 3570 2246 50 0000 L CNN
F 1 "100" H 3570 2155 50 0000 L CNN
F 2 "Resistor_SMD:R_0805_2012Metric" V 3430 2200 50 0001 C CNN
F 3 "~" H 3500 2200 50 0001 C CNN
1 3500 2200
1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -0,0 +1,22 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# R
#
DEF R R 0 0 N Y 1 F N
F0 "R"
F1 "R" 0 0 50 V V C CNN
F2 "" -70 0 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
R_*
$ENDFPLIST
DRAW
S -40 -100 40 100 0 1 10 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
#End Library

View File

@ -0,0 +1,24 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# R
#
DEF R R 0 0 N Y 1 F N
F0 "R" 80 0 50 V V C CNN
F1 "R" 0 0 50 V V C CNN
F2 "" -70 0 50 V I C CNN
F3 "" 0 0 50 H I C CNN
F4 "" 0 0 50 H I C CNN "T1"
F5 "" 0 0 50 H I C CNN
$FPLIST
R_*
R_*
$ENDFPLIST
DRAW
S -40 -100 40 100 0 1 10 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
#End Library

View File

@ -1,4 +1,6 @@
(sym_lib_table
(lib (name l1)(type Legacy)(uri ${KIPRJMOD}/l1.lib)(options "")(descr ""))
(lib (name l2)(type Legacy)(uri ${KIPRJMOD}/l2.lib)(options "")(descr ""))
(lib (name l3)(type Legacy)(uri ${KIPRJMOD}/l3.lib)(options "")(descr ""))
(lib (name l4)(type Legacy)(uri ${KIPRJMOD}/l4.lib)(options "")(descr ""))
)

View File

@ -53,5 +53,11 @@ def test_sch_errors_l2():
setup_ctx('l2', 'error_l2', 'Unexpected end of file')
def test_sch_errors_l3():
setup_ctx('l3', 'error_l3', 'Malformed component field')
def test_sch_errors_l4():
setup_ctx('l4', 'error_l4', 'Missing component field name')