Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package qore-linenoise-module for 
openSUSE:Factory checked in at 2023-02-11 21:57:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qore-linenoise-module (Old)
 and      /work/SRC/openSUSE:Factory/.qore-linenoise-module.new.1848 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qore-linenoise-module"

Sat Feb 11 21:57:16 2023 rev:4 rq:1064350 version:1.0.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/qore-linenoise-module/qore-linenoise-module.changes  
    2022-06-16 18:19:52.116050650 +0200
+++ 
/work/SRC/openSUSE:Factory/.qore-linenoise-module.new.1848/qore-linenoise-module.changes
    2023-02-11 21:57:52.759830206 +0100
@@ -1,0 +2,6 @@
+Sat Feb 11 01:12:04 UTC 2023 - Ferdinand Thiessen <r...@fthiessen.de>
+
+- Update to version 1.0.1
+  * Fix build with newer qore
+
+-------------------------------------------------------------------

Old:
----
  module-linenoise-1.0.0.tar.gz

New:
----
  module-linenoise-1.0.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qore-linenoise-module.spec ++++++
--- /var/tmp/diff_new_pack.qodHM4/_old  2023-02-11 21:57:53.099832323 +0100
+++ /var/tmp/diff_new_pack.qodHM4/_new  2023-02-11 21:57:53.103832348 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package qore-linenoise-module
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %define src_name module-linenoise-%{version}
 %define module_api %(qore --latest-module-api 2>/dev/null)
 Name:           qore-linenoise-module
-Version:        1.0.0
+Version:        1.0.1
 Release:        0
 Summary:        Linenoise module for Qore
 License:        LGPL-2.1-or-later OR MIT
@@ -31,13 +31,11 @@
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  graphviz
-BuildRequires:  qore
-BuildRequires:  qore-devel >= 1.0.0
+BuildRequires:  qore >= 1.12.4
+BuildRequires:  qore-stdlib >= 1.12.4
+BuildRequires:  qore-devel >= 1.12.4
 Requires:       qore-module(abi)%{?_isa} = %{module_api}
 Suggests:       %{name}-doc = %{version}
-# Version schema changed, remove with 1.0.1 release
-Obsoletes:      %{name} = 1.0.0+qore1.0.10
-Obsoletes:      %{name} = 1.0.0+qore0.9.15
 
 %description
 The linenoise module provides readline-like functionality to Qore,
@@ -69,6 +67,6 @@
 
 %files doc
 %doc README
-%doc %{__builddir}/html
+%doc %{__builddir}/docs/linenoise/html
 
 %changelog

++++++ module-linenoise-1.0.0.tar.gz -> module-linenoise-1.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/module-linenoise-1.0.0/CMakeLists.txt 
new/module-linenoise-1.0.1/CMakeLists.txt
--- old/module-linenoise-1.0.0/CMakeLists.txt   2022-01-27 07:48:01.000000000 
+0100
+++ new/module-linenoise-1.0.1/CMakeLists.txt   2022-12-19 18:07:42.000000000 
+0100
@@ -1,10 +1,10 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 2.8.12)
 
 project(qore-linenoise-module)
 
 set (VERSION_MAJOR 1)
 set (VERSION_MINOR 0)
-set (VERSION_PATCH 0)
+set (VERSION_PATCH 1)
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
@@ -39,8 +39,18 @@
 
 add_library(${module_name} MODULE ${CPP_SRC} ${QPP_SOURCES})
 
-qore_binary_module(${module_name} 
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+if (DEFINED ENV{DOXYGEN_EXECUTABLE})
+    set(DOXYGEN_EXECUTABLE $ENV{DOXYGEN_EXECUTABLE})
+endif()
+
+qore_external_binary_module(${module_name} 
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
 
 qore_dist("${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
 
 qore_config_info()
+
+if (DOXYGEN_FOUND)
+  qore_wrap_dox(QORE_DOX_SRC ${QORE_DOX_TMPL_SRC})
+  add_custom_target(QORE_MOD_DOX_FILES DEPENDS ${QORE_DOX_SRC})
+  add_dependencies(docs-module QORE_MOD_DOX_FILES)
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/module-linenoise-1.0.0/examples/linenoise-example 
new/module-linenoise-1.0.1/examples/linenoise-example
--- old/module-linenoise-1.0.0/examples/linenoise-example       1970-01-01 
01:00:00.000000000 +0100
+++ new/module-linenoise-1.0.1/examples/linenoise-example       2022-12-19 
18:07:42.000000000 +0100
@@ -0,0 +1,54 @@
+#!/usr/bin/env qore
+
+%requires linenoise
+
+%new-style
+%require-types
+%strict-args
+%enable-all-warnings
+
+Linenoise::history_set_max_len(10);
+
+# h<TAB> is expanded to string: history
+code my_callback = list<string> sub (string value) {
+    list<string> ret = ();
+    if (value == 'h') {
+        ret += 'history';
+    } else if (value == 'q') {
+        ret += 'quit';
+    }
+
+    return ret;
+};
+
+Linenoise::set_callback(my_callback);
+
+try {
+    Linenoise::history_load('history.txt');
+} catch (hash<ExceptionInfo> ex) {
+    printf("History is not loaded: %s: %s\n", ex.err, ex.desc);
+}
+
+while (True) {
+    *string line = Linenoise::line("Example Prompt> ");
+    if (!exists line) {
+        printf("^C signal caught. Exiting.\n");
+        break;
+    }
+
+    if (line == 'quit') {
+        printf("exiting on user request\n");
+        break;
+    } else if (line == 'help' || line == '?') {
+        printf("commands:\n\thelp\n\tquit\n\thistory\n");
+        continue;
+    } else if (line == 'history' || line == 'h') {
+        printf("history:\n%N\n", Linenoise::history());
+        continue;
+    }
+
+    Linenoise::history_add(line);
+    printf("OK, doing: '%s'\n", line);
+}
+
+Linenoise::history_save('history.txt');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/module-linenoise-1.0.0/qore-linenoise-module.spec 
new/module-linenoise-1.0.1/qore-linenoise-module.spec
--- old/module-linenoise-1.0.0/qore-linenoise-module.spec       2022-01-27 
07:48:01.000000000 +0100
+++ new/module-linenoise-1.0.1/qore-linenoise-module.spec       2022-12-19 
18:07:42.000000000 +0100
@@ -5,7 +5,7 @@
 %global user_module_dir %{mydatarootdir}/qore-modules/
 
 Name:           qore-linenoise-module
-Version:        1.0.0
+Version:        1.0.1
 Release:        1
 Summary:        Qorus Integration Engine - Qore linenoise module
 License:        MIT
@@ -16,12 +16,27 @@
 %if 0%{?el7}
 BuildRequires:  devtoolset-7-gcc-c++
 %endif
-BuildRequires:  cmake >= 3.12.4
-BuildRequires:  qore-devel >= 1.0
+BuildRequires:  cmake >= 3.5
+BuildRequires:  qore-devel >= 1.12.4
+BuildRequires:  qore-stdlib >= 1.12.4
+BuildRequires:  qore >= 1.12.4
+BuildRequires:  doxygen
 Requires:       %{_bindir}/env
 Requires:       qore >= 1.0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
+%package doc
+Summary: Documentation and examples for the Qore linenoise module
+Group: Development/Languages/Other
+
+%description doc
+This package contains the HTML documentation and example programs for the Qore
+linenoise module.
+
+%files doc
+%defattr(-,root,root,-)
+%doc docs/linenoise test examples
+
 %description
 This package contains the linenoise module for the Qore Programming Language.
 
@@ -38,6 +53,8 @@
 alias linenoise=/usr/bin/linenoise3
 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=RELWITHDEBINFO 
-DCMAKE_SKIP_RPATH=1 -DCMAKE_SKIP_INSTALL_RPATH=1 -DCMAKE_SKIP_BUILD_RPATH=1 
-DCMAKE_PREFIX_PATH=${_prefix}/lib64/cmake/Qore .
 make %{?_smp_mflags}
+make %{?_smp_mflags} docs
+sed -i 's/#!\/usr\/bin\/env qore/#!\/usr\/bin\/qore/' test/*.qtest examples/*
 
 %install
 make DESTDIR=%{buildroot} install %{?_smp_mflags}
@@ -45,7 +62,15 @@
 %files
 %{module_dir}
 
+%check
+qore -l ./linenoise-api-1.3.qmod test/linenoise.qtest
+
 %changelog
-* Wed Jan 27 2022 David Nichols <da...@qore.org>
+* Mon Dec 19 2022 David Nichols <da...@qore.org> 1.0.1
+- updated to version 1.0.1
+- use cmake for the build
+- added tests to rpm build process
+
+* Thu Jan 27 2022 David Nichols <da...@qore.org> 1.0.0
 - initial 1.0.0 release
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/module-linenoise-1.0.0/src/linenoise.qpp 
new/module-linenoise-1.0.1/src/linenoise.qpp
--- old/module-linenoise-1.0.0/src/linenoise.qpp        2022-01-27 
07:48:01.000000000 +0100
+++ new/module-linenoise-1.0.1/src/linenoise.qpp        2022-12-19 
18:07:42.000000000 +0100
@@ -3,7 +3,7 @@
 
     Qore Programming Language
 
-    Copyright 2012 - 2018 Qore Technologies, s.r.o.
+    Copyright 2012 - 2022 Qore Technologies, s.r.o.
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
@@ -28,30 +28,32 @@
 
 /** @mainpage %Qore %Linenoise Module
 
+    @tableofcontents
 
-The linenoise module provides readline-like functionality to Qore, allowing
-qore programs to manage comfortable user input in the command line.
+    @section jniintro jni Module Introduction
 
-This module is released under a choice of two licenses:
+    The linenoise module provides readline-like functionality to Qore, allowing
+    qore programs to manage comfortable user input in the command line.
 
- - LGPL 2.1
- - MIT (see COPYING.MIT in the source distribution for more information)
+    This module is released under a choice of two licenses:
 
-The module is tagged as such in the module's header (meaning it can be
-loaded unconditionally regardless of how the Qore library was initialized).
+    - LGPL 2.1
+    - MIT (see COPYING.MIT in the source distribution for more information)
 
-The underlying functionality is provided by Linenoise library, Steve Bennett's 
fork
-https://github.com/msteveb/linenoise
-of the original version
-https://github.com/antirez/linenoise
+    The module is tagged as such in the module's header (meaning it can be
+    loaded unconditionally regardless of how the Qore library was initialized).
 
+    The underlying functionality is provided by Linenoise library, Steve 
Bennett's fork
+    https://github.com/msteveb/linenoise
+    of the original version
+    https://github.com/antirez/linenoise
 
-@section basic_usage Basic Usage
+    @section basic_usage Basic Usage
 
-The core of functionality is the Qore::Linenoise::line() function. It waits 
for user input
-providing basic and advanced edit functionality.
+    The core of functionality is the Qore::Linenoise::line() function. It 
waits for user input
+    providing basic and advanced edit functionality.
 
-@code{.py}
+    @code{.py}
 %new-style
 %require-types
 %strict-args
@@ -67,42 +69,40 @@
 
     # process the line value...
 }
-@endcode
-
-
-@section history_handling History Handling
+    @endcode
 
-Linenoise module keeps history in its internal structure. To add a history item
-use @ref Qore::Linenoise::history_add()
+    @section history_handling History Handling
 
-Full history content can be obained with @ref Qore::Linenoise::history
+    Linenoise module keeps history in its internal structure. To add a history 
item
+    use @ref Qore::Linenoise::history_add()
 
-To handle history size use @ref Qore::Linenoise::history_set_max_len and
-@ref Qore::Linenoise::history_get_max_len
+    Full history content can be obained with @ref Qore::Linenoise::history
 
-History is not persistent accross processes (the memory is cleared when the 
process terminates).
-To store and load history content use @ref Qore::Linenoise::history_save()
-and @ref Qore::Linenoise::history_load()
+    To handle history size use @ref Qore::Linenoise::history_set_max_len and
+    @ref Qore::Linenoise::history_get_max_len
 
+    History is not persistent accross processes (the memory is cleared when 
the process terminates).
+    To store and load history content use @ref Qore::Linenoise::history_save()
+    and @ref Qore::Linenoise::history_load()
 
-@section line_completion Line Completion
+    @section line_completion Line Completion
 
-Users start line completion by pressing the TAB key when in @ref 
Qore::Linenoise::line().
+    Users start line completion by pressing the TAB key when in @ref 
Qore::Linenoise::line().
 
-An callback has to be used to provide line completion values.
-The callback is registered with @ref Qore::Linenoise::set_callback().
+    An callback has to be used to provide line completion values.
+    The callback is registered with @ref Qore::Linenoise::set_callback().
 
-@note The callback code must accept a \c string as an input argument and 
return a \c list.
+    @note The callback code must accept a \c string as an input argument and 
return a \c list.
 
-If the input argument isn't a string, a \c RUNTIME-OVERLOAD-ERROR exception 
will be thrown.
+    If the input argument isn't a string, a \c RUNTIME-OVERLOAD-ERROR 
exception will be thrown.
 
-If the return value isn't a list, the return will be ignored.
+    If the return value isn't a list, the return will be ignored.
 
-Non string members of returned list will be converted to string (string 
representation
-of the list member will be used).
+    Non string members of returned list will be converted to string (string 
representation
+    of the list member will be used).
 
-<b>Example</b>
-@code{.py}
+    <b>Example</b>
+    @code{.py}
 # h<TAB> is expanded to string: history
 list sub my_callback(string value) {
     list ret = ();
@@ -113,59 +113,64 @@
 }
 
 Linenoise::set_callback(\my_callback());
-@endcode
+    @endcode
+
+    @section key_shortcuts Keyboard Shortcuts
+
+    <table>
+    <tr><th>Shortcut</th><th>Alternative</th><th>Description</th></tr>
+    <tr><td>\c Enter</td><td>\c Return</td><td>submit the user input</td></tr>
+    <tr><td>\c Tab</td><td>&nbsp;</td><td>starts a code completion if the 
callback is defined, @ref line_completion</td></tr>
+    <tr><td>\c Up</td><td>\c Ctrl+P</td><td>history move, one step up</td></tr>
+    <tr><td>\c Down</td><td>\c Ctrl+N</td><td>history move, one step 
down</td></tr>
+    <tr><td>\c PgUp<td>&nbsp;</td><td>move to start of history</td></tr>
+    <tr><td>\c PgDown<td>&nbsp;</td><td>move to the end of history = current 
text</td></tr>
+    <tr><td>\c Left</td><td>\c Ctrl+B</td><td>move by one char left</td></tr>
+    <tr><td>\c Right</td><td>\c Ctrl+F</td><td>move by one char right</td></tr>
+    <tr><td>\c Home</td><td>\c Ctrl+A</td><td>go to the start of the 
line</td></tr>
+    <tr><td>\c End</td><td>\c Ctrl+E</td><td>go to the end of the 
line</td></tr>
+    <tr><td>\c Ctrl+C<td>&nbsp;</td><td>keyboard interrupt, @ref nothing 
"NOTHING" is returned from Qore::Linenoise::line() call</td></tr>
+    <tr><td>\c Backspace</td><td>\c Ctrl+H</td><td>delete one char 
before</td></tr>
+    <tr><td>\c Ctrl+D<td>&nbsp;</td><td>like a Ctrl+C when there is no user 
content in edit buffer, otherwise like a DELETE</td></tr>
+    <tr><td>\c Ctrl+W<td>&nbsp;</td><td>delete word at left, save deleted 
chars</td></tr>
+    <tr><td>\c Ctrl+R<td>&nbsp;</td><td>display the reverse-i-search prompt 
and process chars. See an additional controls for @ref 
find_key_shortcut</td></tr>
+    <tr><td>\c Ctrl+T<td>&nbsp;</td><td>if cursor is at end, transpose the 
previous two chars</td></tr>
+    <tr><td>\c Ctrl+V<td>&nbsp;</td><td>handle ^V sequence. Add ^V than waits 
for any other input or cancel ^V if it's in ^V mode already</td></tr>
+    <tr><td>\c Ctrl+U<td>&nbsp;</td><td>delete to beginning of line, save 
deleted chars</td></tr>
+    <tr><td>\c Ctrl+K<td>&nbsp;</td><td>delete from current to end of line, 
save deleted chars</td></tr>
+    <tr><td>\c Ctrl+Y<td>&nbsp;</td><td>insert saved chars at current 
position</td></tr>
+    <tr><td>\c Ctrl+L<td>&nbsp;</td><td>clear screen</td></tr>
+    </table>
+
+    @subsection find_key_shortcut Search Keyboard Shortcuts
+
+    These shortcuts are valid in reverse-i-search (\c Ctrl+R) mode
+
+    <table>
+    <tr><th>Shortcut</th><th>Alternative</th><th>Description</th></tr>
+    <tr><td>\c Delete</td><td>\c Ctrl+H</td><td>delete, return to normal 
operation mode if the line is empty</td></tr>
+    <tr><td>\c Up</td><td>\c Ctrl+P</td><td>Search for the previous (earlier) 
match</td></tr>
+    <tr><td>\c Down</td><td>\c Ctrl+N</td><td>Search for the next (later) 
match</td></tr>
+    <tr><td>\c Ctrl+G</td><td>\c Ctrl+C</td><td>terminates the search with no 
effect</td></tr>
+    <tr><td>\c Ctrl+J</td><td>&nbsp;</td><td>terminates the search leaving the 
buffer in place</td></tr>
+    </table>
 
-@section key_shortcuts Keyboard Shortcuts
+    @section jnireleasenotes jni Module Release Notes
 
-<table>
-<tr><th>Shortcut</th><th>Alternative</th><th>Description</th></tr>
-<tr><td>\c Enter</td><td>\c Return</td><td>submit the user input</td></tr>
-<tr><td>\c Tab</td><td>&nbsp;</td><td>starts a code completion if the callback 
is defined, @ref line_completion</td></tr>
-<tr><td>\c Up</td><td>\c Ctrl+P</td><td>history move, one step up</td></tr>
-<tr><td>\c Down</td><td>\c Ctrl+N</td><td>history move, one step down</td></tr>
-<tr><td>\c PgUp<td>&nbsp;</td><td>move to start of history</td></tr>
-<tr><td>\c PgDown<td>&nbsp;</td><td>move to the end of history = current 
text</td></tr>
-<tr><td>\c Left</td><td>\c Ctrl+B</td><td>move by one char left</td></tr>
-<tr><td>\c Right</td><td>\c Ctrl+F</td><td>move by one char right</td></tr>
-<tr><td>\c Home</td><td>\c Ctrl+A</td><td>go to the start of the line</td></tr>
-<tr><td>\c End</td><td>\c Ctrl+E</td><td>go to the end of the line</td></tr>
-<tr><td>\c Ctrl+C<td>&nbsp;</td><td>keyboard interrupt, @ref nothing "NOTHING" 
is returned from Qore::Linenoise::line() call</td></tr>
-<tr><td>\c Backspace</td><td>\c Ctrl+H</td><td>delete one char before</td></tr>
-<tr><td>\c Ctrl+D<td>&nbsp;</td><td>like a Ctrl+C when there is no user 
content in edit buffer, otherwise like a DELETE</td></tr>
-<tr><td>\c Ctrl+W<td>&nbsp;</td><td>delete word at left, save deleted 
chars</td></tr>
-<tr><td>\c Ctrl+R<td>&nbsp;</td><td>display the reverse-i-search prompt and 
process chars. See an additional controls for @ref find_key_shortcut</td></tr>
-<tr><td>\c Ctrl+T<td>&nbsp;</td><td>if cursor is at end, transpose the 
previous two chars</td></tr>
-<tr><td>\c Ctrl+V<td>&nbsp;</td><td>handle ^V sequence. Add ^V than waits for 
any other input or cancel ^V if it's in ^V mode already</td></tr>
-<tr><td>\c Ctrl+U<td>&nbsp;</td><td>delete to beginning of line, save deleted 
chars</td></tr>
-<tr><td>\c Ctrl+K<td>&nbsp;</td><td>delete from current to end of line, save 
deleted chars</td></tr>
-<tr><td>\c Ctrl+Y<td>&nbsp;</td><td>insert saved chars at current 
position</td></tr>
-<tr><td>\c Ctrl+L<td>&nbsp;</td><td>clear screen</td></tr>
-</table>
-
-@subsection find_key_shortcut Search Keyboard Shortcuts
-
-These shortcuts are valid in reverse-i-search (\c Ctrl+R) mode
-
-<table>
-<tr><th>Shortcut</th><th>Alternative</th><th>Description</th></tr>
-<tr><td>\c Delete</td><td>\c Ctrl+H</td><td>delete, return to normal operation 
mode if the line is empty</td></tr>
-<tr><td>\c Up</td><td>\c Ctrl+P</td><td>Search for the previous (earlier) 
match</td></tr>
-<tr><td>\c Down</td><td>\c Ctrl+N</td><td>Search for the next (later) 
match</td></tr>
-<tr><td>\c Ctrl+G</td><td>\c Ctrl+C</td><td>terminates the search with no 
effect</td></tr>
-<tr><td>\c Ctrl+J</td><td>&nbsp;</td><td>terminates the search leaving the 
buffer in place</td></tr>
-</table>
+    @subsection linenoise_1_0_1 linenoise Module Version 1.0.1
+    - updated to build with \c qpp from %Qore 1.12.4+
 
+    @subsection linenoise_1_0_0 linenoise Module Version 1.0.0
+    - initial release
 */
 
 static QoreNamespace LinenoiseNS("Linenoise");
 
 void init_linenoise_functions(QoreNamespace& ns);
 
-
 QoreThreadLock lock;
 ResolvedCallReferenceNode* callbackNode = nullptr;
 
-
 void qore_lineoise_completion_cb(const char *input, linenoiseCompletions 
*qter) {
 //    AutoLocker al(lock);
 
@@ -227,16 +232,13 @@
 DLLEXPORT qore_module_delete_t qore_module_delete = linenoise_module_delete;
 DLLEXPORT qore_license_t qore_module_license = QL_LGPL;
 
-
-
 /** @defgroup linenoise_functions Linenoise Functions
  */
-//@{
+///@{
 namespace Qore::Linenoise;
 
 //! Main function to obtain line value
 /**
-
     The function waits for user input confirmed by Enter.
 
     @param prompt a custom string with prompt
@@ -394,6 +396,4 @@
         callbackNode->deref(xsink);
     callbackNode = callback->refRefSelf();
 }
-
-
-//@}
+///@}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/module-linenoise-1.0.0/test/linenoise.qtest 
new/module-linenoise-1.0.1/test/linenoise.qtest
--- old/module-linenoise-1.0.0/test/linenoise.qtest     1970-01-01 
01:00:00.000000000 +0100
+++ new/module-linenoise-1.0.1/test/linenoise.qtest     2022-12-19 
18:07:42.000000000 +0100
@@ -0,0 +1,24 @@
+#!/usr/bin/env qore
+
+%requires linenoise
+
+%new-style
+%require-types
+%strict-args
+%enable-all-warnings
+
+%requires QUnit
+
+%exec-class LinenoiseTest
+
+class LinenoiseTest inherits Test {
+    constructor() : Test("LinenoiseTest", "1.0") {
+        addTestCase("linenoise main", \test());
+        set_return_value(main());
+    }
+
+    test() {
+        # currently only a basic sanity test
+        assertGt(0, Linenoise::columns());
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/module-linenoise-1.0.0/test/test.q 
new/module-linenoise-1.0.1/test/test.q
--- old/module-linenoise-1.0.0/test/test.q      2022-01-27 07:48:01.000000000 
+0100
+++ new/module-linenoise-1.0.1/test/test.q      1970-01-01 01:00:00.000000000 
+0100
@@ -1,54 +0,0 @@
-#!/usr/bin/env qore
-
-%requires linenoise
-
-my *string $line;
-
-Linenoise::history_set_max_len(10);
-
-# h<TAB> is expanded to string: history
-list sub my_callback(string $value) {
-    list $ret = ();
-    if ($value == 'h')
-        push $ret, 'history';
-    else if ($value == 'q')
-        push $ret, 'quit';
-
-    return $ret;
-}
-
-Linenoise::set_callback(\my_callback());
-
-try {
-    Linenoise::history_load('history.txt');
-}
-catch ($ex) {
-    printf("History is not loaded: %s - %s\n", $ex.err, $ex.desc);
-}
-
-
-while (True) {
-    my *string $line = Linenoise::line("Qore Prompt> ");
-    if (!exists $line) {
-        printf("^C signal caught. Exiting.\n");
-        break;
-    }
-
-    if ($line == 'quit') {
-        printf("Hi ho!\n");
-        break;
-    }
-    else if ($line == 'help' || $line == '?') {
-        printf("commands:\n\thelp\n\tquit\n\thistory\n");
-        continue;
-    }
-    else if ($line == 'history' || $line == 'h') {
-        printf("history:\n%N\n", Linenoise::history());
-        continue;
-    }
-
-    Linenoise::history_add($line);
-    printf("OK, doing: '%s'\n", $line);
-}
-
-Linenoise::history_save('history.txt');

Reply via email to