Synopsis: |
| tounixpath.cs |
| ||
using ut;
public class testtounixpath
{
public string toUnixPath(string path)
{
return path.Replace(@"\", @"/");
}
public void test_identities()
{
utx.assert(toUnixPath(""), "");
utx.assert(toUnixPath("x"), "x");
utx.assert(toUnixPath(@"c:/x"), @"c:/x");
}
public void test_1()
{
utx.assert(toUnixPath(@"x\y"), @"x/y");
utx.assert(toUnixPath(@"\y"), @"/y");
utx.assert(toUnixPath(@"x\"), @"x/");
utx.assert(toUnixPath(@"c:x\"), @"c:x/");
utx.assert(toUnixPath(@"\"), @"/");
}
}
|
| Contact me about content on this page using john_web-at-arrizza-dot-com |
| For Web Master or site problems contact: webadmin-at-arrizza-dot-com |
| Copyright John Arrizza (c) 2001-2010 |