~ubuntu-branches/ubuntu/lucid/groovy/lucid

« back to all changes in this revision

Viewing changes to src/test/groovy/bugs/Groovy1081_Bug.groovy

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath, Torsten Werner, Varun Hiremath
  • Date: 2009-04-01 19:24:19 UTC
  • mfrom: (3.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090401192419-c5mpylqhcdkv3zuv
Tags: 1.6.0-1
[ Torsten Werner ]
* New upstream release (Closes: #521648)
* Remove Build-Depends: libclassworlds-java.
* Switch to source and target version 1.5.

[ Varun Hiremath ]
* Fix build.xml file
* Add ivy to Build-Depends
* Remove unnecessary Depends -- collections3, mx4j and xpp3 
* Add build.diff patch to fix a build error
* Use quilt to manage patches
* Update manpage (Closes: #507862)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package groovy.bugs
2
 
 
3
 
/**
4
 
 *  Verifies that DefaultGroovyMethods.transformLine(Reader, Writer, Closure)
5
 
 *  actually writes its output.
6
 
 */
7
 
 
8
 
class Groovy1081_Bug extends GroovyTestCase {
9
 
 
10
 
    void testShort() {
11
 
        def reader = new StringReader('abc')
12
 
                def writer = new StringWriter()
13
 
 
14
 
                reader.transformLine(writer) { it }
15
 
                
16
 
                // Implementation was creating a BufferedWriter, but not flushing it
17
 
                assertTrue(writer.toString().startsWith('abc'))
18
 
    }
19
 
    
20
 
}
 
1
package groovy.bugs
 
2
 
 
3
/**
 
4
 *  Verifies that DefaultGroovyMethods.transformLine(Reader, Writer, Closure)
 
5
 *  actually writes its output.
 
6
 */
 
7
 
 
8
class Groovy1081_Bug extends GroovyTestCase {
 
9
 
 
10
    void testShort() {
 
11
        def reader = new StringReader('abc')
 
12
                def writer = new StringWriter()
 
13
 
 
14
                reader.transformLine(writer) { it }
 
15
                
 
16
                // Implementation was creating a BufferedWriter, but not flushing it
 
17
                assertTrue(writer.toString().startsWith('abc'))
 
18
    }
 
19
    
 
20
}