@@ -0,0 +1,971 @@
+package net.sf.expectit;%0A%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport static net.sf.expectit.matcher.Matchers.regexp;%0A%0Apublic class WindowsProcessTest %7B%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        Process process = Runtime.getRuntime().exec(%22cmd.exe%22);%0A        Expect expect = new ExpectBuilder()%0A                .withInputs(process.getInputStream(), process.getErrorStream())%0A                .withOutput(process.getOutputStream())%0A                .withTimeout(1, TimeUnit.SECONDS)%0A                .withExceptionOnFailure()%0A                .build();%0A        expect.expect(regexp(%22C:%5C%5C%5C%5CUsers%5C%5C%5C%5C.*%3E%22));%0A        expect.sendLine(%22echo HELLO%22);%0A        expect.expect(regexp(%22C:%5C%5C%5C%5CUsers%5C%5C%5C%5C.*%3E%22));%0A        expect.sendLine(%22dir%22);%0A        String list = expect.expect(regexp(%22C:%5C%5C%5C%5CUsers%5C%5C%5C%5C.*%3E%22)).getBefore();%0A        System.out.println(%22List: %22 + list);%0A        expect.close();%0A        expect.sendLine(%22exit%22);%0A        process.waitFor();%0A    %7D%0A%7D%0A

Add windows example