[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5755] inc search non-regex test
From: |
Gavin D. Smith |
Subject: |
[5755] inc search non-regex test |
Date: |
Sun, 17 Aug 2014 17:28:30 +0000 |
Revision: 5755
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5755
Author: gavin
Date: 2014-08-17 17:28:29 +0000 (Sun, 17 Aug 2014)
Log Message:
-----------
inc search non-regex test
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/session.c
Added Paths:
-----------
trunk/info/t/inc-sea-forward-nonregex.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-17 16:51:06 UTC (rev 5754)
+++ trunk/ChangeLog 2014-08-17 17:28:29 UTC (rev 5755)
@@ -1,5 +1,12 @@
2014-08-17 Gavin Smith <address@hidden>
+ * info/session.c (incremental_search): Use same call to
+ info_search_internal for both regex and non-regex searches.
+
+ * info/t/inc-sea-forward-nonregex.sh: New test.
+
+2014-08-17 Gavin Smith <address@hidden>
+
* info/session.c (incremental_search): Remove unused argument. When
searching backward again, position one byte before current match.
(info_search_internal, info_search_in_node_internal): Always start
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2014-08-17 16:51:06 UTC (rev 5754)
+++ trunk/info/Makefile.am 2014-08-17 17:28:29 UTC (rev 5755)
@@ -122,6 +122,7 @@
t/resize-in-completions.sh \
t/search-skip-screen.sh \
t/inc-sea-forward.sh \
+ t/inc-sea-forward-nonregex.sh \
t/anchor-positions.sh \
t/quoted-label-as-target.sh \
t/quoted-target.sh \
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-17 16:51:06 UTC (rev 5754)
+++ trunk/info/session.c 2014-08-17 17:28:29 UTC (rev 5755)
@@ -4334,39 +4334,9 @@
break;
}
- /* Regex isearch means we better search again every time. We
- might have had a failed search for "\", for example, but now we
- have "\.". */
- if (use_regex)
- {
- search_result = info_search_internal (isearch_string,
- window, dir, case_sensitive,
- &start_off);
- }
- else
- {
- /* Check to see if the current search string is right here. If
- we are looking at it, then don't bother calling the search
- function. */
- if (((dir < 0) &&
- ((case_sensitive ? strncmp : mbsncasecmp)
- (window->node->contents + window->point,
- isearch_string, isearch_string_index) == 0)) ||
- ((dir > 0) &&
- ((window->point - isearch_string_index) >= 0) &&
- ((case_sensitive ? strncmp : mbsncasecmp)
- (window->node->contents +
- (window->point - (isearch_string_index - 1)),
- isearch_string, isearch_string_index) == 0)))
- {
- if (dir > 0)
- window->point++;
- }
- else
- search_result = info_search_internal (isearch_string,
- window, dir, case_sensitive,
- NULL);
- }
+ search_result = info_search_internal (isearch_string,
+ window, dir, case_sensitive,
+ &start_off);
/* If this search failed, and we didn't already have a failed search,
then ring the terminal bell. */
Added: trunk/info/t/inc-sea-forward-nonregex.sh
===================================================================
--- trunk/info/t/inc-sea-forward-nonregex.sh (rev 0)
+++ trunk/info/t/inc-sea-forward-nonregex.sh 2014-08-17 17:28:29 UTC (rev
5755)
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-inter.inc
+
+run_ginfo -f search
+
+# Turn off regular expressions, and search for "match" with incremental
+# search. Test deleting characters from search string with backspace. Go
+# forward to match in next node. Test we end up at the end of the match
+# string by trying to wrap to the next line with C-f.
+printf 'R\023matchxy\010\010' >$PTY_TYPE
+printf '\023\023\023\r\006\rDq' >$PTY_TYPE
+
+. $t/Timeout-test.inc
+
+# Return non-zero (test failure) if files differ
+diff $GINFO_OUTPUT $t/node-target
+RETVAL=$?
+
+. $t/Cleanup.inc
+
Property changes on: trunk/info/t/inc-sea-forward-nonregex.sh
___________________________________________________________________
Added: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5755] inc search non-regex test,
Gavin D. Smith <=