File tree Expand file tree Collapse file tree 5 files changed +70
-2
lines changed
maven/jruby-complete/src/it/GH-1983_jruby-completedotjar-S-irb-doesnt-work-anymore Expand file tree Collapse file tree 5 files changed +70
-2
lines changed Original file line number Diff line number Diff line change 9
9
10
10
require "irb"
11
11
12
- if __FILE__ == $0
12
+ if __FILE__ . sub ( /file:/ , '' ) == $0. sub ( /file:/ , '' )
13
13
IRB . start ( __FILE__ )
14
14
else
15
15
# check -e option
Original file line number Diff line number Diff line change 49
49
JRuby . objectspace = true # useful for code completion
50
50
51
51
# From vanilla IRB
52
- if __FILE__ == $0
52
+ if __FILE__ . sub ( /file:/ , '' ) == $0. sub ( /file:/ , '' )
53
53
IRB . start ( __FILE__ )
54
54
else
55
55
# check -e option
Original file line number Diff line number Diff line change
1
+ JAVA=` which java`
2
+ # jirb_swing does not work in those test environments
3
+ for i in irb jirb ; do
4
+ echo " puts 'hello $i '" | PATH= $JAVA -jar jruby-complete-1.7.16-SNAPSHOT.jar -S $i
5
+ done
Original file line number Diff line number Diff line change
1
+ <project >
2
+ <groupId >org.jruby</groupId >
3
+ <artifactId >execute-java--jar-jruby-complete_dot_jar--S-jirb</artifactId >
4
+ <version >1</version >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <dependencies >
8
+ <dependency >
9
+ <groupId >org.jruby</groupId >
10
+ <artifactId >jruby-complete</artifactId >
11
+ <version >1.7.16-SNAPSHOT</version >
12
+ <type >jar</type >
13
+ </dependency >
14
+ </dependencies >
15
+
16
+ <build >
17
+ <resources >
18
+ <resource >
19
+ <directory >../../local-repo/org/jruby/jruby-complete/1.7.16-SNAPSHOT</directory >
20
+ <includes >
21
+ <include >jruby-complete-*.jar</include >
22
+ </includes >
23
+ <targetPath >${project.basedir} </targetPath >
24
+ </resource >
25
+ </resources >
26
+ <plugins >
27
+ <plugin >
28
+ <groupId >org.codehaus.mojo</groupId >
29
+ <artifactId >exec-maven-plugin</artifactId >
30
+ <version >1.2</version >
31
+ <executions >
32
+ <execution >
33
+ <phase >package</phase >
34
+ <goals ><goal >exec</goal ></goals >
35
+ <configuration >
36
+ <executable >irb.sh</executable >
37
+ </configuration >
38
+ </execution >
39
+ </executions >
40
+ </plugin >
41
+ </plugins >
42
+ </build >
43
+ </project >
Original file line number Diff line number Diff line change
1
+ import java.io.*;
2
+ import org.codehaus.plexus.util.FileUtils;
3
+
4
+
5
+ String log = FileUtils.fileRead( new File( basedir, "build.log" ) );
6
+ String expected = "hello irb";
7
+ if ( !log.contains( expected ) )
8
+ {
9
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
10
+ }
11
+ // expected = "hello swing_jirb";
12
+ // if ( !log.contains( expected ) )
13
+ // {
14
+ // throw new RuntimeException( "log file does not contain '" + expected + "'" );
15
+ // }
16
+ expected = "hello jirb";
17
+ if ( !log.contains( expected ) )
18
+ {
19
+ throw new RuntimeException( "log file does not contain '" + expected + "'" );
20
+ }
You can’t perform that action at this time.
0 commit comments