Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/OutputParser.java @ 410:df5009d67be2 smartgit3
Fixed test to pass in a branch other than default
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Mar 2012 20:19:51 +0100 |
parents | 66fd2c73c56f |
children | 0e34b8f3946a |
comparison
equal
deleted
inserted
replaced
409:0f5696623512 | 410:df5009d67be2 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 TMate Software Ltd | 2 * Copyright (c) 2011-2012 TMate Software Ltd |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
5 * it under the terms of the GNU General Public License as published by | 5 * it under the terms of the GNU General Public License as published by |
6 * the Free Software Foundation; version 2 of the License. | 6 * the Free Software Foundation; version 2 of the License. |
7 * | 7 * |
25 | 25 |
26 public void parse(CharSequence seq); | 26 public void parse(CharSequence seq); |
27 | 27 |
28 public class Stub implements OutputParser { | 28 public class Stub implements OutputParser { |
29 private boolean shallDump; | 29 private boolean shallDump; |
30 private CharSequence result; | |
31 | |
30 public Stub() { | 32 public Stub() { |
31 this(false); | 33 this(false); |
32 } | 34 } |
33 public Stub(boolean dump) { | 35 public Stub(boolean dump) { |
34 shallDump = dump; | 36 shallDump = dump; |
35 } | 37 } |
36 public void parse(CharSequence seq) { | 38 public void parse(CharSequence seq) { |
39 result = seq; | |
37 if (shallDump) { | 40 if (shallDump) { |
38 System.out.println(seq); | 41 System.out.println(seq); |
39 } | 42 } |
40 // else no-op | 43 // else no-op |
41 } | 44 } |
45 public CharSequence result() { | |
46 return result; | |
47 } | |
42 } | 48 } |
43 } | 49 } |