Commit 06cf6d6c authored by Julien Lopez's avatar Julien Lopez

Add some tests in typesTest, A | B fails because tlv is empty (problem in

	update_tlv?)
Add uninstall mode for hooks in tools/install_hooks.sh
parent b1f88f1e
......@@ -22,7 +22,13 @@ let tlv_tests = [ "is_var", [
"`$A | Int", Types.is_var, false;
"(`$A,Int)", Types.is_var, false;
"Any \\ `$A", Types.is_var, true; (* ~`$A *)
"Any \\ (Any \\ `$A)", Types.is_var, true; (* `$A *)
"`$A \\ Any", Types.is_var, false; (* Empty *)
"`$A \\ Empty", Types.is_var, true;
"(Any \\`$A) \\ Empty", Types.is_var, true; (* ~`$A *)
"`$A & `$B", Types.is_var, false;
"`$A | `$B", Types.is_var, false;
"`$A \\ `$B", Types.is_var, false;
];
"no_var", [
......@@ -38,6 +44,12 @@ let tlv_tests = [ "is_var", [
"(`$A,Int)", Types.no_var, false;
"(Char,Int)", Types.no_var, true;
"`$A \\ Any", Types.no_var, true; (* Empty *)
"`$A \\ Empty", Types.no_var, false;
"(Any \\`$A) \\ Empty", Types.no_var, false; (* ~`$A *)
"Any \\ (Any \\ `$A)", Types.no_var, false; (* `$A *)
"`$A & `$B", Types.no_var, false;
"`$A | `$B", Types.no_var, false;
"`$A \\ `$B", Types.no_var, false;
];
"has_tlv", [
......@@ -54,6 +66,12 @@ let tlv_tests = [ "is_var", [
"`$A | (`$B,Int)", Types.has_tlv, true;
"`$A | (Char,Int)", Types.has_tlv, true;
"Any \\ `$A", Types.has_tlv, true;
"`$A \\ Empty", Types.has_tlv, true;
"(Any \\`$A) \\ Empty", Types.has_tlv, true; (* ~`$A *)
"Any \\ (Any \\ `$A)", Types.has_tlv, true; (* `$A *)
"`$A & `$B", Types.has_tlv, true;
(* "`$A | `$B", Types.has_tlv, true;*) (* TODO: Fix this test *)
"`$A \\ `$B", Types.has_tlv, true;
];
]
......
......@@ -9,6 +9,14 @@ while test $# -ne 0; do
if test $1 = "-d" || test $1 = "--debug"; then
HOOKSDIR=$ROOT/tools/git_hooks/debug
fi
if test $1 = "-u" || test $1 = "--uninstall"; then
echo -n "Uninstalling git hooks from local repository..."
for i in $HOOKS; do
rm -f $GITHOOKSDIR/$i
done
echo "done."
exit 0
fi
shift
done
......@@ -23,4 +31,3 @@ for i in $HOOKS; do
echo "done."
fi
done
echo "Finished."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment