diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-09 00:06:24 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-09 00:06:24 -0500 |
commit | 736d495d637035783380973b69df043e0263e9d8 (patch) | |
tree | 378e6ad1902ccd84e234c80757bc168910c4fd7f | |
parent | 3eb6867efa16f891512710eb2bb852483337eb5c (diff) | |
download | horizon-736d495d637035783380973b69df043e0263e9d8.tar.gz horizon-736d495d637035783380973b69df043e0263e9d8.tar.bz2 horizon-736d495d637035783380973b69df043e0263e9d8.tar.xz horizon-736d495d637035783380973b69df043e0263e9d8.zip |
tests: Ensure only parser error counts are counted for parser tests
-rw-r--r-- | tests/spec/validator.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/spec/validator.rb b/tests/spec/validator.rb index 4ad5544..497db58 100644 --- a/tests/spec/validator.rb +++ b/tests/spec/validator.rb @@ -10,7 +10,7 @@ def use_fixture(fixture) copy '%/' + fixture, IFILE_PATH end -SUCCESS_OUTPUT = /0 error\(s\), 0 warning\(s\)/ +PARSER_SUCCESS = /parser: 0 error\(s\), 0 warning\(s\)/ RSpec.describe 'HorizonScript Validation Utility', :type => :aruba do context "argument passing" do @@ -43,24 +43,24 @@ RSpec.describe 'HorizonScript Validation Utility', :type => :aruba do it "successfully reads a basic installfile" do use_fixture '0001-basic.installfile' run_validate - expect(last_command_started).to have_output(SUCCESS_OUTPUT) + expect(last_command_started).to have_output(PARSER_SUCCESS) end # HorizonScript Specification, ch 3. it "handles comments" do use_fixture '0002-basic-commented.installfile' run_validate - expect(last_command_started).to have_output(SUCCESS_OUTPUT) + expect(last_command_started).to have_output(PARSER_SUCCESS) end # HorizonScript Specification, ch 3. it "handles blank lines and indentation" do use_fixture '0003-basic-whitespace.installfile' run_validate - expect(last_command_started).to have_output(SUCCESS_OUTPUT) + expect(last_command_started).to have_output(PARSER_SUCCESS) end it "requires keys to have values" do use_fixture '0015-keys-without-values.installfile' run_validate ' --keep-going' - expect(last_command_started).to have_output(/2 error\(s\)/) + expect(last_command_started).to have_output(/parser: 2 error\(s\)/) end # XXX: no requirement. it "fails on lines over maximum line length" do @@ -178,7 +178,7 @@ RSpec.describe 'HorizonScript Validation Utility', :type => :aruba do it "works with all types of package atoms" do use_fixture '0022-all-kinds-of-atoms.installfile' run_validate - expect(last_command_started).to have_output(SUCCESS_OUTPUT) + expect(last_command_started).to have_output(PARSER_SUCCESS) end it "does not accept invalid package atoms" do use_fixture '0023-pkginstall-invalid-modifier.installfile' |