diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-06-26 15:41:31 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-06-26 15:44:18 -0700 |
commit | de9cb76d749caf68d8cdfd5e1e3b7ea45df03d73 (patch) | |
tree | f99467cebbd0ed8370d2e4ef0bf06ebcd9843c96 | |
parent | a11936dff401b59cd2eddd2cf48092e0b504f6e8 (diff) | |
download | chef-de9cb76d749caf68d8cdfd5e1e3b7ea45df03d73.tar.gz |
Revert "Merge pull request #10052 from chef/fix-diff-tests"revert-initial-diff-fix
This reverts commit 70efe2b6766846ff913461fe7da35bed2b98ce4f, reversing
changes made to cb79fb33208efe059a49871192c94bcfded481ab.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | spec/unit/chef_fs/diff_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/unit/chef_fs/diff_spec.rb b/spec/unit/chef_fs/diff_spec.rb index 88cd6540e5..726adf8e50 100644 --- a/spec/unit/chef_fs/diff_spec.rb +++ b/spec/unit/chef_fs/diff_spec.rb @@ -26,10 +26,9 @@ describe "diff", uses_diff: true do # Removes the date stamp from the diff and replaces it with ' DATE' # example match: "/dev/null\t2012-10-16 16:15:54.000000000 +0000" # windows match: "--- /dev/null\tTue Oct 16 18:04:34 2012" - # https://rubular.com/r/5JdtZDqWnZhB9J 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 context "with two filesystems with all types of difference" do |