[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5752] error message for --node without a file
From: |
Gavin D. Smith |
Subject: |
[5752] error message for --node without a file |
Date: |
Fri, 15 Aug 2014 23:49:24 +0000 |
Revision: 5752
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5752
Author: gavin
Date: 2014-08-15 23:49:23 +0000 (Fri, 15 Aug 2014)
Log Message:
-----------
error message for --node without a file
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/info.c
Added Paths:
-----------
trunk/info/t/node-no-file.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-15 23:11:43 UTC (rev 5751)
+++ trunk/ChangeLog 2014-08-15 23:49:23 UTC (rev 5752)
@@ -1,3 +1,9 @@
+2014-08-16 Gavin Smith <address@hidden>
+
+ * info/info.c (add_initial_nodes): Error message if --node used
+ without a filename being specified.
+ * info/t/node-no-file.sh: New test.
+
2014-08-15 Gavin Smith <address@hidden>
* info/session.c (match_in_match_list): Arguments changed.
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2014-08-15 23:11:43 UTC (rev 5751)
+++ trunk/info/Makefile.am 2014-08-15 23:49:23 UTC (rev 5752)
@@ -89,6 +89,7 @@
t/file-index.sh \
t/file-file-with-dot.sh \
t/no-file.sh \
+ t/node-no-file.sh \
t/split.sh \
t/relative-path.sh \
t/file-relative-path.sh \
Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c 2014-08-15 23:11:43 UTC (rev 5751)
+++ trunk/info/info.c 2014-08-15 23:49:23 UTC (rev 5752)
@@ -302,7 +302,15 @@
if (info_parsed_filename)
node_filename = xstrdup (info_parsed_filename);
else
- node_filename = initial_file->fullpath;
+ {
+ if (!initial_file)
+ {
+ asprintf (error, _("No file given for node `%s'."),
+ user_nodenames[i]);
+ continue;
+ }
+ node_filename = initial_file->fullpath;
+ }
add_pointer_to_array
(info_new_reference (node_filename,
Added: trunk/info/t/node-no-file.sh
===================================================================
--- trunk/info/t/node-no-file.sh (rev 0)
+++ trunk/info/t/node-no-file.sh 2014-08-15 23:49:23 UTC (rev 5752)
@@ -0,0 +1,22 @@
+#!/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
+
+# Ask for a node without saying which file it's in
+$GINFO --output - --node nodename \
+ 2>&1 | grep 'No file given'
Property changes on: trunk/info/t/node-no-file.sh
___________________________________________________________________
Added: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5752] error message for --node without a file,
Gavin D. Smith <=