diff options
author | jkeiser <jkeiser@opscode.com> | 2013-01-21 16:35:47 -0800 |
---|---|---|
committer | jkeiser <jkeiser@opscode.com> | 2013-01-21 16:37:41 -0800 |
commit | a98b2fdac335cf9c7a2eedf5a87b22f9159ff81c (patch) | |
tree | 0a34816168bf719be0a52a09b13693457da58679 | |
parent | c8cda8e560f0ce1e64d1e336d81ac9e2c6f73a7e (diff) | |
download | chef-solaris_diff_problems.tar.gz |
Replace \d,\d correctlysolaris_diff_problems
-rw-r--r-- | spec/unit/chef_fs/diff_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/unit/chef_fs/diff_spec.rb b/spec/unit/chef_fs/diff_spec.rb index 7dfa15e215..805c3fc8c6 100644 --- a/spec/unit/chef_fs/diff_spec.rb +++ b/spec/unit/chef_fs/diff_spec.rb @@ -26,7 +26,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.sub(/^@@ -\d[,\d]? \+\d(,\d)? @@/, 'CONTEXT_LINE_NUMBERS') + diff.gsub(/^@@ -\d(,\d)? \+\d(,\d)? @@/, 'CONTEXT_LINE_NUMBERS') end describe 'diff', :uses_diff => true do @@ -103,7 +103,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/both_dirs/sub_dirs_empty_in_a_filled_in_b/subsub DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +subsub ','diff --knife a/both_dirs/sub_dirs_empty_in_b_filled_in_a/subsub b/both_dirs/sub_dirs_empty_in_b_filled_in_a/subsub deleted file @@ -125,7 +125,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/both_dirs/sub_b_only_file DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +sub_b_only_file ','diff --knife a/both_files_different b/both_files_different --- a/both_files_different DATE @@ -137,7 +137,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/dirs_empty_in_a_filled_in_b/subsub DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +subsub ','diff --knife a/dirs_empty_in_b_filled_in_a/subsub b/dirs_empty_in_b_filled_in_a/subsub deleted file @@ -159,7 +159,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/b_only_file DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +b_only_file ' ] end @@ -179,7 +179,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/both_dirs/sub_dirs_empty_in_a_filled_in_b/subsub DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +subsub ','diff --knife a/both_dirs/sub_dirs_empty_in_b_filled_in_a/subsub b/both_dirs/sub_dirs_empty_in_b_filled_in_a/subsub deleted file @@ -201,7 +201,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/both_dirs/sub_b_only_file DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +sub_b_only_file ' ] end @@ -235,7 +235,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/b_only_file DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +b_only_file ' ] end @@ -269,7 +269,7 @@ CONTEXT_LINE_NUMBERS new file --- /dev/null DATE +++ b/b_only_file DATE -@@ -0,0 +1 @@ +CONTEXT_LINE_NUMBERS +b_only_file ' ] end |