[Mono-bugs] [Bug 504378] Routes in System.Web.Routing don't handle "Variable Number of Segments" correctly (Catchall)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 15 17:17:27 EDT 2009


User amirshim at yahoo.com added comment

Amir Shimoni <amirshim at yahoo.com> changed:

           What    |Removed                     |Added
             Status|NEEDINFO                    |NEW
                 CC|                            |amirshim at yahoo.com
      Info Provider|amirshim at yahoo.com          |

--- Comment #3 from Amir Shimoni <amirshim at yahoo.com>  2009-05-15 15:17:26 MDT ---
So I added a test case for RouteTest.cs
in Directory: /mcs/class/System.Web.Routing/Test/System.Web.Routing

The patch above is for this test:

                public void GetRouteData8 ()
                      var r = new Route ("{first}/{*rest}", null);
                      var hc = new HttpContextStub ("~/a/b/c/d", String.Empty);
                      var rd = r.GetRouteData (hc);
                      Assert.IsNotNull (rd, "#1");
                      Assert.AreEqual (r, rd.Route, "#2");
                      Assert.AreEqual (0, rd.DataTokens.Count, "#3");
                      Assert.AreEqual (2, rd.Values.Count, "#4");
                      Assert.AreEqual ("a", rd.Values ["first"], "#4-1");
                      Assert.AreEqual ("b/c/d", rd.Values ["rest"], "#4-2");

When run on the current SVN
cd /mcs/class/System.Web.Routing/
nunit-console2 System.Web.Routing_test_net_2_0.dll -run

even the first assert fails...

Test Case Failures:
1) MonoTests.System.Web.Routing.RouteTest.GetRouteData8 :   #1
  Expected: not null
  But was:  null

But when System.Web.Routing.dll is replaced with the Microsoft one, the test

(Put the microsoft dll in /mcs/class/System.Web.Routing/, set MONO_PATH=. and

nunit-console2 System.Web.Routing_test_net_2_0.dll -run

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list