Skip to content

Commit

Permalink
Merge pull request #227 from mbenson/FORGE-695
Browse files Browse the repository at this point in the history
[FORGE-695] address windows-specific shell test failures in a platform-i...
  • Loading branch information
lincolnthree committed Oct 11, 2012
2 parents 0c72134 + fcb1e45 commit f2ae953
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

public class DidYouMeanObserverTest extends AbstractShellTest
{
private static final String EOL = System.getProperty("line.separator");

@Test(expected = NoSuchCommandException.class)
public void testNoSuggestionsSuggestMissingPlugin() throws Exception
Expand All @@ -26,15 +27,17 @@ public void testNoSuggestionsSuggestMissingPlugin() throws Exception
public void testSuggestInvalidCommand() throws Exception
{
getShell().execute("l");
assertTrue(getOutput().contains("Did you mean this ?\n\tls"));
assertTrue(getOutput().contains(String.format(
"Did you mean this ?%s\tls", EOL)));
}

@Test
public void testSuggestInvalidAliasedCommand() throws Exception
{
getShell().execute("alias \"ll=ls -l\"");
getShell().execute("l");
assertTrue(getOutput().contains("Did you mean any of these ?\n\tll\n\tls"));
assertTrue(getOutput().contains(String.format(
"Did you mean any of these ?%1$s\tll%1$s\tls", EOL)));
}

}

0 comments on commit f2ae953

Please sign in to comment.