From 71f03ec3e948e7e8871657bcb19ea65aafea57e8 Mon Sep 17 00:00:00 2001 From: Kuba Clark Date: Fri, 20 Sep 2019 01:02:53 +0200 Subject: feat: Add Java Module (#314) Implements a Java module which shows basic Java information when inside a Java project. --- tests/testsuite/java.rs | 26 ++++++++++++++++++++++++++ tests/testsuite/main.rs | 1 + 2 files changed, 27 insertions(+) create mode 100644 tests/testsuite/java.rs (limited to 'tests/testsuite') diff --git a/tests/testsuite/java.rs b/tests/testsuite/java.rs new file mode 100644 index 000000000..9cced9d08 --- /dev/null +++ b/tests/testsuite/java.rs @@ -0,0 +1,26 @@ +use std::fs::File; +use std::io; + +use ansi_term::Color; + +use crate::common; + +// When these tests run in the CI, they use Azul's Zulu Java distribution. +// The version format returned by this java package is irregular and not supported (yet). + +//#[test] +//#[ignore] +//fn folder_with_pom() -> io::Result<()> { +// let dir = common::new_tempdir()?; +// File::create(dir.path().join("pom.xml"))?; +// +// let output = common::render_module("java") +// .arg("--path") +// .arg(dir.path()) +// .output()?; +// let actual = String::from_utf8(output.stdout).unwrap(); +// +// let expected = format!("via {} ", Color::Red.dimmed().paint("☕ ")); +// assert_eq!(expected, actual); +// Ok(()) +//} diff --git a/tests/testsuite/main.rs b/tests/testsuite/main.rs index f92a702cf..d299ca610 100644 --- a/tests/testsuite/main.rs +++ b/tests/testsuite/main.rs @@ -8,6 +8,7 @@ mod git_state; mod git_status; mod golang; mod hostname; +mod java; mod jobs; mod line_break; mod modules; -- cgit v1.2.3