Permalink
Browse files

Merge branch '2.2' into persistent_pubsub

  • Loading branch information...
2 parents b0535f5 + a9ee331 commit 4107c797dee955e6ca0c46c306a725bff3366cca @sdether sdether committed May 26, 2011
Showing with 3 additions and 6 deletions.
  1. +1 −4 src/mindtouch.dream/system/stringutil.cs
  2. +2 −2 src/tests/DreamMisc/XUri-Test.cs
@@ -981,10 +981,7 @@ public static class StringUtil {
/// <param name="n">Integer to convert.</param>
/// <returns>Hexadecimal character.</returns>
public static char IntToHexChar(int n) {
- if(n <= 9) {
- return (char)(n + 0x30);
- }
- return (char)((n - 10) + 0x61);
+ return n.ToString("X")[0];
}
/// <summary>
@@ -300,7 +300,7 @@ public class XUriTest {
Assert.AreEqual("/c=GB", uri.Path);
Assert.AreEqual(1, uri.Segments.Length);
Assert.AreEqual(false, uri.TrailingSlash);
- Assert.AreEqual("objectClass%3fone", uri.Query);
+ Assert.AreEqual("objectClass%3Fone", uri.Query);
Assert.AreEqual(null, uri.Fragment);
}
@@ -490,7 +490,7 @@ public class XUriTest {
[Test]
public void Square_brackets_in_parsed_query_are_encoded_on_render() {
- Assert.AreEqual("http://host/foo?bar%5b123%5d=abc",new XUri("http://host/foo?bar[123]=abc").ToString());
+ Assert.AreEqual("http://host/foo?bar%5B123%5D=abc",new XUri("http://host/foo?bar[123]=abc").ToString());
}
[Test]

0 comments on commit 4107c79

Please sign in to comment.