summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-06-23 12:34:10 -0700
committerPete Higgins <pete@peterhiggins.org>2020-06-23 12:34:10 -0700
commit932abd01b54356ef4eb28a4a846feed56c554196 (patch)
tree92a12eba8ccc16bbcaffb2e500ed68002897e192 /spec
parentbd28207a70f951bc23f249ee1d05f11bf2207b22 (diff)
downloadchef-932abd01b54356ef4eb28a4a846feed56c554196.tar.gz
Update the regex that was scrubbing OS specific strings.
https://rubular.com/r/5JdtZDqWnZhB9J Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/chef_fs/diff_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/chef_fs/diff_spec.rb b/spec/unit/chef_fs/diff_spec.rb
index 27374b357b..7c285feb82 100644
--- a/spec/unit/chef_fs/diff_spec.rb
+++ b/spec/unit/chef_fs/diff_spec.rb
@@ -25,7 +25,7 @@ require "chef/chef_fs/command_line"
# windows match: "--- /dev/null\tTue Oct 16 18:04:34 2012"
def remove_os_differences(diff)
diff = diff.gsub(/([+-]{3}.*)\t.*/, '\1 DATE')
- diff.gsub(/^@@ -\d(,\d)? \+\d(,\d)? @@/, "CONTEXT_LINE_NUMBERS")
+ diff.gsub(/^@@ -\d(,\d)? \+-?\d(,-?\d)? @@/, "CONTEXT_LINE_NUMBERS")
end
describe "diff", uses_diff: true do