Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmp code_desc missing operation and expected valid #1204

Merged
merged 2 commits into from
Oct 10, 2016
Merged

Conversation

alexpop
Copy link
Contributor

@alexpop alexpop commented Oct 5, 2016

Having the following spec file:

describe 6 do
  it { should cmp 6 }
end

describe 7 do
  it { should cmp '7' }
end

describe 8 do
  it { should cmp <= '10' }
end

describe 9 do
  it { should cmp == 9 }
end

I get the following exec output with inspec 1.1.0(latest):

$ be inspec exec ~/tmp/cmp.rb
Target:  local://

  6 should
       cmp 6
  7 should
       cmp "7"
  8 should
       cmp
  9 should
       cmp

^ see the missing operator and value for 8 & 9

The code change in this PR produces the following exec output:

$ be inspec exec ~/tmp/cmp.rb
Target:  local://

  6 should
       cmp == 6
  7 should
       cmp == "7"
  8 should
       cmp <= "10"
  9 should
       cmp == 9

8 & 9 have operator and value 🎉

@alexpop alexpop added the Type: Bug Feature not working as expected label Oct 5, 2016
@arlimus
Copy link
Contributor

arlimus commented Oct 10, 2016

Awesome bugfix, kudos @alexpop 👍

@arlimus arlimus merged commit 6e1ffb4 into master Oct 10, 2016
@arlimus arlimus deleted the ap/cmp-desc branch October 10, 2016 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants