test/misc_test.rb in openwferu-0.9.4 vs test/misc_test.rb in openwferu-0.9.5
- old
+ new
@@ -46,9 +46,25 @@
assert \
em.is_definition?('process-definition'),
"process-definition should be considered as a definition"
end
+ def test_ensure_for_filename
+
+ assert OpenWFE::ensure_for_filename("abc") == "abc"
+ assert OpenWFE::ensure_for_filename("a/c") == "a_c"
+ assert OpenWFE::ensure_for_filename("a\\c") == "a_c"
+ assert OpenWFE::ensure_for_filename("a*c") == "a_c"
+ assert OpenWFE::ensure_for_filename("a+?") == "a__"
+ assert OpenWFE::ensure_for_filename("a b") == "a_b"
+ end
+
+ def test_clean_path
+
+ assert OpenWFE::clean_path("my//file/path") == "my/file/path"
+ assert OpenWFE::clean_path("my//file//path") == "my/file/path"
+ end
+
def test_dup
a0 = A.new
a0.a = 1
a0.b = 2
a1 = OpenWFE::fulldup(a0)