diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-06-23 12:54:07 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-06-23 12:54:07 -0700 |
commit | 7069955cd1964a805faed26c3035fd3e43b23d1d (patch) | |
tree | ae5e8c21c3336c8b2034ed3230c93f2a02d22543 | |
parent | 932abd01b54356ef4eb28a4a846feed56c554196 (diff) | |
download | chef-7069955cd1964a805faed26c3035fd3e43b23d1d.tar.gz |
Add rubular link for regex in test.fix-diff-tests
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | spec/unit/chef_fs/diff_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/unit/chef_fs/diff_spec.rb b/spec/unit/chef_fs/diff_spec.rb index 7c285feb82..29c25e2823 100644 --- a/spec/unit/chef_fs/diff_spec.rb +++ b/spec/unit/chef_fs/diff_spec.rb @@ -23,6 +23,7 @@ require "chef/chef_fs/command_line" # 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") |