aboutsummaryrefslogtreecommitdiffstats
path: root/sdkmanager/app/tests
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2011-09-15 22:07:39 -0700
committerRaphael <raphael@google.com>2011-09-16 13:02:09 -0700
commit2c4c6561c01683bda2681a1449e6a3c0915e5d6a (patch)
treefa09561a30eac249382c67cf00aac8aea2b4c5c8 /sdkmanager/app/tests
parent1bf5cb8ed2172d07e2a61ae9ed58f2d252b9d6ac (diff)
downloadsdk-2c4c6561c01683bda2681a1449e6a3c0915e5d6a.zip
sdk-2c4c6561c01683bda2681a1449e6a3c0915e5d6a.tar.gz
sdk-2c4c6561c01683bda2681a1449e6a3c0915e5d6a.tar.bz2
SDK Manager: make 'list sdk' ids deterministic.
This changes 'android list sdk' to output deterministic install IDs. These IDs can then be give to 'android update sdk'. Example of usage: $ android list sdk --extended Refresh Sources: [...] ---------- id: 2 or "android-13" Type: Platform Desc: Android SDK Platform 3.2, revision 1 [...] ---------- id: 41 or "extra-google-usb_driver" Type: Extra Desc: USB Driver for Windows, revision 4 $ android update sdk --no-ui --filter android-13,extra-google-usb_driver => This installs the platform API 13 and the USB Driver. SDK Bug: 19504 Change-Id: I3109c90371d292df4e9cf845208bf8efe774233f
Diffstat (limited to 'sdkmanager/app/tests')
-rw-r--r--sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java46
1 files changed, 0 insertions, 46 deletions
diff --git a/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java b/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java
index 02d905e..2f70278 100644
--- a/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java
+++ b/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java
@@ -184,50 +184,4 @@ public class CommandLineProcessorTest extends TestCase {
assertEquals(null, c.getValue("verb1", "action1", "first"));
assertEquals(null, c.getValue("verb1", "action1", "second"));
}
-
- public void testReflowLine() {
- MockCommandLineProcessor c = new MockCommandLineProcessor(mLog);
-
- boolean gotNpe = false;
- try {
- c.reflowLine(null);
- } catch(NullPointerException e) {
- gotNpe = true;
- } finally {
- assertTrue(gotNpe);
- }
-
- assertEquals("", c.reflowLine(""));
-
- assertEquals("1234567", c.reflowLine("1234567"));
-
- assertEquals(
- "-- verbose, -v: This description for this flag fits in exactly 78 characters.",
- c.reflowLine("-- verbose, -v: This description for this flag fits in exactly 78 characters."));
-
- assertEquals(
- "--verbose, -v : This description for this flag fits in more than 78\n" +
- " characters and needs to wrap up at the colon.",
- c.reflowLine("--verbose, -v : This description for this flag fits in more than 78 characters and needs to wrap up at the colon."));
-
- assertEquals(
- "If the line needs to wrap but there's no colon marker, the line will just wrap\n" +
- " with 4 spaces.",
- c.reflowLine("If the line needs to wrap but there's no colon marker, the line will just wrap with 4 spaces."));
-
- assertEquals(
- "--blah: More than 78 characters and lots of\n" +
- " spaces. ",
- c.reflowLine("--blah: More than 78 characters and lots of spaces. "));
-
- assertEquals(
- "In this case the colon is at the very end of the string and it's not going to\n" +
- " wrap as expected:",
- c.reflowLine("In this case the colon is at the very end of the string and it's not going to wrap as expected:"));
-
- assertEquals(
- "--flag:In-this-case-there-is-no-whitespace-and-wrapping-will-cut-just-at-the-7\n" +
- " 8-mark.",
- c.reflowLine("--flag:In-this-case-there-is-no-whitespace-and-wrapping-will-cut-just-at-the-78-mark."));
- }
}