From e28dfd240326cb7f0acf03fdaf53a4164bd6c459 Mon Sep 17 00:00:00 2001
From: Enol Fernandez <enolfc@ifca.unican.es>
Date: Thu, 26 Sep 2013 10:55:59 +0200
Subject: [PATCH] New test for issue #3.

---
 tests/test_issue_3.sh | 47 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100755 tests/test_issue_3.sh

diff --git a/tests/test_issue_3.sh b/tests/test_issue_3.sh
new file mode 100755
index 0000000..b09e587
--- /dev/null
+++ b/tests/test_issue_3.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+# Test for https://github.com/IFCA/mpi-start/issues/1
+
+oneTimeSetUp () {
+    export I2G_MPI_START_ENABLE_TESTING="TEST"
+    # source the mpi-start code to have all functions
+    . $I2G_MPI_START
+    mpi_start_check_options
+}
+
+oneTimeTearDown () {
+    for f in $MPI_START_CLEANUP_FILES; do
+        [ -f "$f" ] && rm -f $f
+        [ -d "$f" ] && rm -rf $f
+    done
+}
+
+
+testHostLocalhost() {
+    mpi_start_get_plugin "ssh.filedist" 1
+    . $MPI_START_PLUGIN_FILES
+    is_localhost "localhost"
+    assertEquals "0" "$?"
+}
+
+testHostHostname() {
+    mpi_start_get_plugin "ssh.filedist" 1
+    . $MPI_START_PLUGIN_FILES
+    is_localhost `hostname` 
+    assertEquals "0" "$?"
+}
+
+testHostHostnameS() {
+    mpi_start_get_plugin "ssh.filedist" 1
+    . $MPI_START_PLUGIN_FILES
+    is_localhost `hostname -s` 
+    assertEquals "0" "$?"
+}
+
+testHostHostnameF() {
+    mpi_start_get_plugin "ssh.filedist" 1
+    . $MPI_START_PLUGIN_FILES
+    is_localhost `hostname -f` 
+    assertEquals "0" "$?"
+}
+
+. $SHUNIT2
-- 
GitLab