[Pkg-ocaml-maint-commits] [ocamlwc] 05/05: add test
Ralf Treinen
treinen at moszumanska.debian.org
Sat Dec 10 08:25:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
treinen pushed a commit to branch master
in repository ocamlwc.
commit 4e32bac50700645eae2fe376b0ebe341acdd2f6d
Author: Ralf Treinen <treinen at free.fr>
Date: Sat Dec 10 09:18:44 2016 +0100
add test
---
debian/changelog | 3 ++-
debian/tests/control | 1 +
debian/tests/fonctions2.ml | 15 +++++++++++++++
debian/tests/simple | 5 +++++
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 31ef8ae..f0ca1aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,9 @@ ocamlwc (0.3-13) unstable; urgency=low
- bump debian/compat
- bump build-dependency on debhelper
* Vcs-{Git,Browser}: secure URI
+ * Add as-installed package test.
- -- Ralf Treinen <treinen at debian.org> Sat, 10 Dec 2016 09:07:00 +0100
+ -- Ralf Treinen <treinen at debian.org> Sat, 10 Dec 2016 09:17:55 +0100
ocamlwc (0.3-12) unstable; urgency=medium
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..938774c
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1 @@
+Tests: simple
diff --git a/debian/tests/fonctions2.ml b/debian/tests/fonctions2.ml
new file mode 100644
index 0000000..dad58d7
--- /dev/null
+++ b/debian/tests/fonctions2.ml
@@ -0,0 +1,15 @@
+(* fonctions dans un record *)
+type 'a foo = {n:int; f: 'a -> 'a} ;;
+let foo = {n=42; f=fun x -> x} ;;
+foo.f 33;;
+
+(* fonctions dans une paire. *)
+let fp = ( (fun x -> x+1), (fun x -> x*x) );;
+
+(* attention aux parantheses *)
+let fp = ( fun x -> x+1, fun x -> x*x );;
+
+(* extraction des fonctions d'une paire *)
+(fst fp) 42;;
+(fst fp) ((snd fp) 10);;
+(fst fp) (snd fp) 10;; (* attention aux parantheses *)
diff --git a/debian/tests/simple b/debian/tests/simple
new file mode 100755
index 0000000..ddb7481
--- /dev/null
+++ b/debian/tests/simple
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+inputfile=debian/tests/fonctions2.ml
+expected=" 8 4 $inputfile"
+ocamlwc debian/tests/fonctions2.ml | grep -q "$expected"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/ocamlwc.git
More information about the Pkg-ocaml-maint-commits
mailing list