Skip to content

Instantly share code, notes, and snippets.

@unode
Created January 16, 2018 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unode/de1d45ba822015f8c1934385c3dc54e5 to your computer and use it in GitHub Desktop.
Save unode/de1d45ba822015f8c1934385c3dc54e5 to your computer and use it in GitHub Desktop.
stdin.patch
From 6f52834bab888b6af9669f6dc97fb62accacb6b4 Mon Sep 17 00:00:00 2001
From: Renato Alves <alves.rjc@gmail.com>
Date: Tue, 16 Jan 2018 16:43:53 +0100
Subject: [PATCH] TST --search-dir should be expanded before passing to
external module
---
tests/searchdirExternalModule/Modules/test.ngm/0.0/command.sh | 6 ++++++
tests/searchdirExternalModule/Modules/test.ngm/0.0/module.yaml | 9 +++++++++
tests/searchdirExternalModule/cmdargs | 1 +
tests/searchdirExternalModule/sample.fq | 1 +
tests/searchdirExternalModule/test.ngl | 4 ++++
5 files changed, 21 insertions(+)
create mode 100755 tests/searchdirExternalModule/Modules/test.ngm/0.0/command.sh
create mode 100644 tests/searchdirExternalModule/Modules/test.ngm/0.0/module.yaml
create mode 100644 tests/searchdirExternalModule/cmdargs
create mode 120000 tests/searchdirExternalModule/sample.fq
create mode 100644 tests/searchdirExternalModule/test.ngl
diff --git a/tests/searchdirExternalModule/Modules/test.ngm/0.0/command.sh b/tests/searchdirExternalModule/Modules/test.ngm/0.0/command.sh
new file mode 100755
index 0000000..a72529a
--- /dev/null
+++ b/tests/searchdirExternalModule/Modules/test.ngm/0.0/command.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+if [ "$1" != "/somedir/input.fq" ]; then
+ echo "Expected '/somedir/input.fq' saw '$1'"
+ exit 1
+fi
diff --git a/tests/searchdirExternalModule/Modules/test.ngm/0.0/module.yaml b/tests/searchdirExternalModule/Modules/test.ngm/0.0/module.yaml
new file mode 100644
index 0000000..cac4cd3
--- /dev/null
+++ b/tests/searchdirExternalModule/Modules/test.ngm/0.0/module.yaml
@@ -0,0 +1,9 @@
+version: '0.0.0'
+name: 'Test tool'
+functions:
+ -
+ nglName: "testing_searchdir"
+ arg0: './command.sh'
+
+ arg1:
+ atype: 'str'
diff --git a/tests/searchdirExternalModule/cmdargs b/tests/searchdirExternalModule/cmdargs
new file mode 100644
index 0000000..0326dfc
--- /dev/null
+++ b/tests/searchdirExternalModule/cmdargs
@@ -0,0 +1 @@
+--search-dir data=/somedir
diff --git a/tests/searchdirExternalModule/sample.fq b/tests/searchdirExternalModule/sample.fq
new file mode 120000
index 0000000..8d45525
--- /dev/null
+++ b/tests/searchdirExternalModule/sample.fq
@@ -0,0 +1 @@
+../select/sample.fq
\ No newline at end of file
diff --git a/tests/searchdirExternalModule/test.ngl b/tests/searchdirExternalModule/test.ngl
new file mode 100644
index 0000000..21c3ab8
--- /dev/null
+++ b/tests/searchdirExternalModule/test.ngl
@@ -0,0 +1,4 @@
+ngless '0.0'
+local import "test" version "0.0"
+
+testing_searchdir("<data>/input.fq")
--
2.15.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment