Skip to content

Commit 6140db1

Browse files
Adding test over git clean without -d
1 parent 11a8137 commit 6140db1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/units/test_index_ops.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ def test_clean
5555

5656
assert(File.exists?('file-to-clean'))
5757
assert(File.exists?('dir_to_clean'))
58-
g.clean
58+
59+
g.clean(force:true)
60+
61+
assert(!File.exists?('file-to-clean'))
62+
assert(File.exists?('dir_to_clean'))
63+
64+
new_file('file-to-clean', 'blablahbla')
65+
66+
g.clean(force:true, d:true)
67+
5968
assert(!File.exists?('file-to-clean'))
6069
assert(!File.exists?('dir_to_clean'))
6170
end
@@ -115,4 +124,4 @@ def test_reset
115124
end
116125
end
117126

118-
end
127+
end

0 commit comments

Comments
 (0)