From 69c0ab48ce608375185447f78b7bb53fa00212bc Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 4 Jun 2018 18:24:03 +0700 Subject: [PATCH] Add test for concat_or_split Signed-off-by: Rudi Grinberg --- .../test-cases/quoting/quote-from-context/args | 3 +++ .../test-cases/quoting/quote-from-context/count_args.ml | 3 +++ .../test-cases/quoting/quote-from-context/dune | 6 ++++++ test/blackbox-tests/test-cases/quoting/run.t | 5 +++++ 4 files changed, 17 insertions(+) create mode 100644 test/blackbox-tests/test-cases/quoting/quote-from-context/args create mode 100644 test/blackbox-tests/test-cases/quoting/quote-from-context/count_args.ml create mode 100644 test/blackbox-tests/test-cases/quoting/quote-from-context/dune diff --git a/test/blackbox-tests/test-cases/quoting/quote-from-context/args b/test/blackbox-tests/test-cases/quoting/quote-from-context/args new file mode 100644 index 00000000..98a86f9e --- /dev/null +++ b/test/blackbox-tests/test-cases/quoting/quote-from-context/args @@ -0,0 +1,3 @@ +foo +bar +baz \ No newline at end of file diff --git a/test/blackbox-tests/test-cases/quoting/quote-from-context/count_args.ml b/test/blackbox-tests/test-cases/quoting/quote-from-context/count_args.ml new file mode 100644 index 00000000..5fe897f2 --- /dev/null +++ b/test/blackbox-tests/test-cases/quoting/quote-from-context/count_args.ml @@ -0,0 +1,3 @@ + +let () = + Printf.printf "Number of args: %d\n" (Array.length Sys.argv - 1) diff --git a/test/blackbox-tests/test-cases/quoting/quote-from-context/dune b/test/blackbox-tests/test-cases/quoting/quote-from-context/dune new file mode 100644 index 00000000..319474cb --- /dev/null +++ b/test/blackbox-tests/test-cases/quoting/quote-from-context/dune @@ -0,0 +1,6 @@ +(executable + ((name count_args))) + +(alias + ((name runtest) + (action (run ./count_args.exe ${read-lines:args})))) \ No newline at end of file diff --git a/test/blackbox-tests/test-cases/quoting/run.t b/test/blackbox-tests/test-cases/quoting/run.t index d1f6f44a..97f216ee 100644 --- a/test/blackbox-tests/test-cases/quoting/run.t +++ b/test/blackbox-tests/test-cases/quoting/run.t @@ -17,3 +17,8 @@ The targets should only be interpreted as a single path when quoted - s - t [1] + + $ dune runtest --root quote-from-context + Entering directory 'quote-from-context' + count_args alias runtest + Number of args: 3