Output from compile. >>> Test phase [test]: dev-java/libreadline-java-0.8.0 cd src; make T_LIBS="JavaReadline" JAVAINCLUDE="/opt/blackdown-jdk-1.4.1/include" \ JAVANATINC="/opt/blackdown-jdk-1.4.1/include/linux" native make[1]: Entering directory `/var/tmp/portage/libreadline-java-0.8.0/work/libreadline-java-0.8.0/src' cd native ; make T_LIBS="JavaReadline" JAVAINCLUDE="/opt/blackdown-jdk-1.4.1/include" \ JAVANATINC="/opt/blackdown-jdk-1.4.1/include/linux" all make[2]: Entering directory `/var/tmp/portage/libreadline-java-0.8.0/work/libreadline-java-0.8.0/src/native' make TG=JavaReadline lib make[3]: Entering directory `/var/tmp/portage/libreadline-java-0.8.0/work/libreadline-java-0.8.0/src/native' gcc -I /opt/blackdown-jdk-1.4.1/include -I /opt/blackdown-jdk-1.4.1/include/linux -fPIC -DPOSIX -DJavaReadline \ -c org_gnu_readline_Readline.c gcc -shared org_gnu_readline_Readline.o -L/usr/lib/termcap -lreadline -ltermcap -lhistory -o ../../libJavaReadline.so make[3]: Leaving directory `/var/tmp/portage/libreadline-java-0.8.0/work/libreadline-java-0.8.0/src/native' make[2]: Leaving directory `/var/tmp/portage/libreadline-java-0.8.0/work/libreadline-java-0.8.0/src/native' make[1]: Leaving directory `/var/tmp/portage/libreadline-java-0.8.0/work/libreadline-java-0.8.0/src' LD_LIBRARY_PATH=. java -jar libreadline-java.jar src/test/tinputrc initializing Readline... ... done linux> ^ it's just waiting at this prompt.
The main loop when creating a test case for it. while (true) { try { line = Readline.readline("linux> "); if (line == null) System.out.println("no input"); else System.out.println("line = >" + line + "<"); } catch (UnsupportedEncodingException enc) { System.err.println("caught UnsupportedEncodingException"); break; } catch (IOException eof) { break; } }
well the src/test included there isn't realy a test case, and i don't realy wanna write one myself, so i'm just going too disable it, feel free to submit one though
Instead of a pure "make test", you could do "echo hello | make test". It won't block and it at least tests if the library load correctly.
Well, you'll need to pipe a EOF into the program with some comparison of input and output.
patches welcome :)