Synopsis: |
| todospath.cs |
| ||
using ut;
public class testtodospath
{
public string toDosPath(string path)
{
return path.Replace(@"/", @"\");
}
public void test_identities()
{
utx.assert(toDosPath(@""), @"");
utx.assert(toDosPath(@"x"), @"x");
utx.assert(toDosPath(@"c:\x"), @"c:\x");
}
public void test_1()
{
utx.assert(toDosPath(@"x/y"), @"x\y");
utx.assert(toDosPath(@"/y"), @"\y");
utx.assert(toDosPath(@"x/"), @"x\");
utx.assert(toDosPath(@"c:x/"), @"c:x\");
utx.assert(toDosPath(@"/"), @"\");
}
}
|
| 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,2002,2003,2004,2005,2006,2007 |