diff --git a/test/index.js b/test/index.js index 0dfee11..3aa03f4 100644 --- a/test/index.js +++ b/test/index.js @@ -39,16 +39,20 @@ const test = function(input_path) { // if we're just creating the reference, we can dump the current output if (dump) { - const out = path.join( - path.dirname(input_path), - path.basename(input_path, '.yaml') + '___ref_candidate' - ) // whole dump - if (dump === true) { - fs.writeJSONSync(out + '.json', actual, {spaces: 4}) + if (dump === true || dump === 'true') { + const out = path.join( + path.dirname(input_path), + path.basename(input_path, '.yaml') + '___ref_candidate.json' + ) + fs.writeJSONSync(out, actual, {spaces: 4}) // partial, type-specific dump } else { const part = u.deep(actual, dump) + const out = path.join( + path.dirname(input_path), + path.basename(input_path, '.yaml') + '___' + dump.split('.').join('_') + ) if (a.type(part)() == 'string') { fs.writeFileSync(out + '.txt', part) } else { diff --git a/test/outlines/002_gluing___outlines_outline_dxf.dxf b/test/outlines/002_gluing___outlines_outline_dxf.dxf new file mode 100644 index 0000000..51c042d --- /dev/null +++ b/test/outlines/002_gluing___outlines_outline_dxf.dxf @@ -0,0 +1,518 @@ +0 +SECTION +2 +HEADER +9 +$INSUNITS +70 +4 +0 +ENDSEC +0 +SECTION +2 +TABLES +0 +TABLE +2 +LTYPE +0 +LTYPE +72 +65 +70 +64 +2 +CONTINUOUS +3 +______ +73 +0 +40 +0 +0 +ENDTAB +0 +TABLE +2 +LAYER +0 +ENDTAB +0 +ENDSEC +0 +SECTION +2 +ENTITIES +0 +LINE +8 +0 +10 +-12.8171276 +20 +-5.9767248 +11 +39.3525425 +21 +-24.9649308 +0 +LINE +8 +0 +10 +-12.8171276 +20 +-5.9767248 +11 +0.5216579 +21 +30.6712874 +0 +LINE +8 +0 +10 +0.5216579 +20 +30.6712874 +11 +39.3525425 +21 +16.5380017 +0 +LINE +8 +0 +10 +41.5354149 +20 +17.3325019 +11 +78.1834271 +21 +30.6712874 +0 +LINE +8 +0 +10 +41.5354149 +20 +17.3325019 +11 +39.3525425 +21 +16.5380017 +0 +LINE +8 +0 +10 +39.3525425 +20 +-24.9649308 +11 +91.5222126 +21 +-5.9767248 +0 +LINE +8 +0 +10 +78.1834271 +20 +30.6712874 +11 +91.5222126 +21 +-5.9767248 +0 +LINE +8 +0 +10 +-8.9719893 +20 +-4.1837073 +11 +4.1837073 +21 +-8.9719893 +0 +LINE +8 +0 +10 +4.1837073 +20 +-8.9719893 +11 +8.9719893 +21 +4.1837073 +0 +LINE +8 +0 +10 +8.9719893 +20 +4.1837073 +11 +-4.1837073 +21 +8.9719893 +0 +LINE +8 +0 +10 +-4.1837073 +20 +8.9719893 +11 +-8.9719893 +21 +-4.1837073 +0 +LINE +8 +0 +10 +-2.4736066 +20 +13.6704525 +11 +10.68209 +21 +8.8821705 +0 +LINE +8 +0 +10 +10.68209 +20 +8.8821705 +11 +15.470372 +21 +22.0378671 +0 +LINE +8 +0 +10 +15.470372 +20 +22.0378671 +11 +2.3146754 +21 +26.8261491 +0 +LINE +8 +0 +10 +2.3146754 +20 +26.8261491 +11 +-2.4736066 +21 +13.6704525 +0 +LINE +8 +0 +10 +8.8821705 +20 +-10.68209 +11 +22.0378671 +21 +-15.470372 +0 +LINE +8 +0 +10 +22.0378671 +20 +-15.470372 +11 +26.8261491 +21 +-2.3146754 +0 +LINE +8 +0 +10 +26.8261491 +20 +-2.3146754 +11 +13.6704525 +21 +2.4736066 +0 +LINE +8 +0 +10 +13.6704525 +20 +2.4736066 +11 +8.8821705 +21 +-10.68209 +0 +LINE +8 +0 +10 +15.3805532 +20 +7.1720698 +11 +28.5362498 +21 +2.3837878 +0 +LINE +8 +0 +10 +28.5362498 +20 +2.3837878 +11 +33.3245318 +21 +15.5394844 +0 +LINE +8 +0 +10 +33.3245318 +20 +15.5394844 +11 +20.1688352 +21 +20.3277664 +0 +LINE +8 +0 +10 +20.1688352 +20 +20.3277664 +11 +15.3805532 +21 +7.1720698 +0 +LINE +8 +0 +10 +74.5213777 +20 +-8.9719893 +11 +87.6770743 +21 +-4.1837073 +0 +LINE +8 +0 +10 +87.6770743 +20 +-4.1837073 +11 +82.8887923 +21 +8.9719893 +0 +LINE +8 +0 +10 +82.8887923 +20 +8.9719893 +11 +69.7330957 +21 +4.1837073 +0 +LINE +8 +0 +10 +69.7330957 +20 +4.1837073 +11 +74.5213777 +21 +-8.9719893 +0 +LINE +8 +0 +10 +68.022995 +20 +8.8821705 +11 +81.1786916 +21 +13.6704525 +0 +LINE +8 +0 +10 +81.1786916 +20 +13.6704525 +11 +76.3904096 +21 +26.8261491 +0 +LINE +8 +0 +10 +76.3904096 +20 +26.8261491 +11 +63.234713 +21 +22.0378671 +0 +LINE +8 +0 +10 +63.234713 +20 +22.0378671 +11 +68.022995 +21 +8.8821705 +0 +LINE +8 +0 +10 +56.6672179 +20 +-15.470372 +11 +69.8229145 +21 +-10.68209 +0 +LINE +8 +0 +10 +69.8229145 +20 +-10.68209 +11 +65.0346325 +21 +2.4736066 +0 +LINE +8 +0 +10 +65.0346325 +20 +2.4736066 +11 +51.8789359 +21 +-2.3146754 +0 +LINE +8 +0 +10 +51.8789359 +20 +-2.3146754 +11 +56.6672179 +21 +-15.470372 +0 +LINE +8 +0 +10 +50.1688352 +20 +2.3837878 +11 +63.3245318 +21 +7.1720698 +0 +LINE +8 +0 +10 +63.3245318 +20 +7.1720698 +11 +58.5362498 +21 +20.3277664 +0 +LINE +8 +0 +10 +58.5362498 +20 +20.3277664 +11 +45.3805532 +21 +15.5394844 +0 +LINE +8 +0 +10 +45.3805532 +20 +15.5394844 +11 +50.1688352 +21 +2.3837878 +0 +ENDSEC +0 +EOF \ No newline at end of file