@@ -21,16 +21,16 @@ def test_cat_file
21
21
EXPECTED
22
22
23
23
# The file was deleted by the "remove..." patch. Check that it does not exist now, but existed in parent.
24
- assert_equal nil , darcs . cat_file ( Scm ::Commit . new ( :token => '1007b5ad4831769283213d47e1fd5f6d30ac97f0' ) , Scm ::Diff . new ( :path => 'helloworld.c' ) )
25
- assert_equal expected , darcs . cat_file_parent ( Scm ::Commit . new ( :token => '1007b5ad4831769283213d47e1fd5f6d30ac97f0' ) , Scm ::Diff . new ( :path => 'helloworld.c' ) )
26
- assert_equal expected , darcs . cat_file ( Scm ::Commit . new ( :token => 'bd7e455d648b784ce4be2db26a4e62dfe734dd66' ) , Scm ::Diff . new ( :path => 'helloworld.c' ) )
24
+ assert_equal nil , darcs . cat_file ( OhlohScm ::Commit . new ( :token => '1007b5ad4831769283213d47e1fd5f6d30ac97f0' ) , OhlohScm ::Diff . new ( :path => 'helloworld.c' ) )
25
+ assert_equal expected , darcs . cat_file_parent ( OhlohScm ::Commit . new ( :token => '1007b5ad4831769283213d47e1fd5f6d30ac97f0' ) , OhlohScm ::Diff . new ( :path => 'helloworld.c' ) )
26
+ assert_equal expected , darcs . cat_file ( OhlohScm ::Commit . new ( :token => 'bd7e455d648b784ce4be2db26a4e62dfe734dd66' ) , OhlohScm ::Diff . new ( :path => 'helloworld.c' ) )
27
27
end
28
28
end
29
29
30
30
# Ensure that we escape bash-significant characters like ' and & when they appear in the filename
31
31
# NB only works with --reserved-ok, otherwise darcs rejects with "invalid under Windows"
32
32
def test_funny_file_name_chars
33
- Scm ::ScratchDir . new do |dir |
33
+ OhlohScm ::ScratchDir . new do |dir |
34
34
# Make a file with a problematic filename
35
35
funny_name = '|file_name (&\'")'
36
36
File . open ( File . join ( dir , funny_name ) , 'w' ) { |f | f . write "contents" }
@@ -40,7 +40,7 @@ def test_funny_file_name_chars
40
40
darcs . run ( "cd #{ dir } && darcs init && darcs add --reserved-ok * && darcs record -a -m test" )
41
41
42
42
# Confirm that we can read the file back
43
- assert_equal "contents" , darcs . cat_file ( darcs . head , Scm ::Diff . new ( :path => funny_name ) )
43
+ assert_equal "contents" , darcs . cat_file ( darcs . head , OhlohScm ::Diff . new ( :path => funny_name ) )
44
44
end
45
45
end
46
46
0 commit comments