commit ab956a50a63183de9c93ea5018952089bce5a8b8
Author: Kornel Benko <[email protected]>
Date: Mon May 22 08:56:42 2017 +0200
Cmake tests: remove handling of bindings in user.bind.
It is done now by keytest.py
---
lib/scripts/prefTest.pl.in | 47 +------------------------------------------
1 files changed, 2 insertions(+), 45 deletions(-)
diff --git a/lib/scripts/prefTest.pl.in b/lib/scripts/prefTest.pl.in
index 1d8aa90..3e002d9 100755
--- a/lib/scripts/prefTest.pl.in
+++ b/lib/scripts/prefTest.pl.in
@@ -2,8 +2,9 @@
# -*- mode: perl; -*-
use strict;
+use warnings;
-# Syntax: ReplaceValuesprefTest.pl [<var1>=<Subst1> [<var2>=<Subst> ...]]
[[ctest parameters]]
+# Syntax: prefTest.pl [<var1>=<Subst1> [<var2>=<Subst> ...]] [[ctest
parameters]]
my $bindir = "@CMAKE_BINARY_DIR@";
@@ -14,13 +15,6 @@ my %allowedKeys = (
"use_converter_needauth" => ["true", "false"],
);
-# Bindings used by some tests
-# used file is "$userdir/bind/user.bind"
-my %bindings = (
- # Empty for now, example below
- # "A-h" => ["dialog-hide", "findreplaceadv"],
- );
-
chdir($bindir);
# Parse Arguments for strings to substitute
@@ -82,43 +76,6 @@ if (%Subst) { # Try to do something only if a substitute is
requested
}
}
-if (open(FO, '>', "$userdir/userbind.tmp")) {
- my %used = ();
- if (open(FI, "$userdir/bind/user.bind")) {
- while (my $l = <FI>) {
- my $found = 0;
- for my $k (keys %bindings) {
- if ($l =~ /^\s*\\bind\s+\"$k\"/) {
- $found = 1;
- if (! defined($used{$k})) {
- $used{$k} = 1;
- $l = "\\bind \"$k\" \"" . join(' ', @{$bindings{$k}}) . "\"\n";
- print FO $l;
- last;
- }
- }
- print FO $l if (! $found);
- }
- }
- close(FI);
- }
- else {
- print FO "## This file is automatically generated by lyx\n";
- print FO "## All modifications will be lost\n";
- print FO "\n\n";
- print FO "Format 4\n\n";
- }
- for my $k (keys %bindings) {
- if (! defined($used{$k})) {
- $used{$k} = 1;
- my $l = "\\bind \"$k\" \"" . join(' ', @{$bindings{$k}}) . "\"\n";
- print FO $l;
- }
- }
- close(FO);
- rename("$userdir/userbind.tmp", "$userdir/bind/user.bind");
-}
-
my $res = 0;
if (@ctestpars) {
$res = system("ctest", @ctestpars);