1. 16 Jan, 2015 1 commit
  2. 25 Apr, 2014 1 commit
  3. 19 Dec, 2013 2 commits
  4. 16 Dec, 2013 1 commit
  5. 29 Nov, 2013 1 commit
  6. 14 Nov, 2013 1 commit
    • Murray Cumming's avatar
      Add a test for correct default field values. · 93f654f5
      Murray Cumming authored
      * examples/example_smallbusiness.glom: Add a string default
        value, so we can test it. There are already some numeric
        default values.
      * Makefile_tests.am:
      * tests/test_selfhosting_new_from_example_defaultvalues.cc:
        Check some default values.
      93f654f5
  7. 22 Oct, 2013 1 commit
  8. 11 Sep, 2013 1 commit
    • Murray Cumming's avatar
      Use the regular AX_BOOST_PYTHON configure.ac macro. · 75c2f220
      Murray Cumming authored
      	* macros/ax_boost_python_murrayc.m4: Remove this heavily changed
      	version of AX_BOOST_PYTHON because it is hard to use this while getting
      	improvements to the official one.
      	* macros/mm-python.m4: Remove this, which we used in
      	AX_BOOST_PYTHON_MURRAYC.
      	* macros/: Add the latest versions of ax_python_devel.m4,
      	ax_boost_base.m4 and ax_boost_python.m4.
      	* configure.ac: Use the official macros.
      	* Makefile_libglom.am: Create some variables to build the
      	flags and concatenate them together for simple use, and use them.
      	* Makefile_tests.am: Use the variables here too.
      
      Hopefully this does not cause any regressions. It should make it
      easier to use python 3.
      75c2f220
  9. 26 Apr, 2013 1 commit
  10. 06 Jan, 2013 1 commit
    • Murray Cumming's avatar
      tests: Add: test_selfhosting_new_from_example_float.cc · 3b5a6393
      Murray Cumming authored
              * Makefile_tests.am:
              * tests/test_selfhosting_utils.[h|cc]:
      Add test_check_numeric_value_type().
              * tests/test_selfhosting_new_from_example_float.cc: Add
      this simple test that gets a float value, to check that
      we do not lose precision. It seems to fail with MySQL.
      It also seems to cause a crash or hang with PostgreSQL
      during cleanup.
      3b5a6393
  11. 23 Nov, 2012 1 commit
  12. 22 Nov, 2012 2 commits
    • Murray Cumming's avatar
      Tests: Use the locally-built glom. · 477edde0
      Murray Cumming authored
      * configure.ac:
              * Makefile_tests.am:
      * tests/tests_glom_date_in_locales.sh.in:
      Generate tests/tests_glom_date_in_locales.sh from
      tests/tests_glom_date_in_locales.sh.in, so it can
      include the path to the locally-built glom
      executable.
      477edde0
    • Murray Cumming's avatar
      Tests: Use the locally-built python module. · 7be1c466
      Murray Cumming authored
              * Makefile_tests.am: Set the PYTHONPATH in
      automake's TESTS_ENVIRONMENT variable
      to fix make check before make install has run,
      and generally to be a correct check.
      7be1c466
  13. 11 Nov, 2012 2 commits
    • Murray Cumming's avatar
      Tests: Add pixbuf-loading tests in more places. · 0f963c3c
      Murray Cumming authored
              * tests/test_document_load_image.cc:
              * Makefile_tests.am:
              * tests/test_utils_images.[h|cc]: Move the use of GdkPixbufLoader
      into a check_value_is_an_image() utility function.
              * tests/test_field_file_format.cc:
              * tests/test_selfhosting_new_then_image.cc: Use it here too.
      0f963c3c
    • Murray Cumming's avatar
      examples: Add a static image item to the Project Manager example. · 0a9fccb4
      Murray Cumming authored
              * examples/example_project_manager.glom: This is just so we
      use this layout item somewhere, so we can test it.
              * glom/glom_document.dtd: Mention the layout_item_image tag.
      * configure.ac:
      * Makefile_tests.am:
      * tests/test_document_load_image.cc: Add a new test for this
      feature, using GdkPixbufLoader to check that we can interpret
      the data as an image.
      0a9fccb4
  14. 02 Nov, 2012 2 commits
    • Murray Cumming's avatar
      Move a test out the ui tests. · 9132f7dc
      Murray Cumming authored
      * Because it uses the glom executable, which needs an
      X display, even when parsing the command line parameters.
      I blame GtkApplication.
      9132f7dc
    • Murray Cumming's avatar
      Add --enable-ui-tests. · cf1f50cf
      Murray Cumming authored
      * configure.ac, Makefile_tests.am:
      Allow the tests that actually instantiate windows to
      be disabled, for running under headless continuous
      integration systems.
      cf1f50cf
  15. 03 Feb, 2012 2 commits
    • Murray Cumming's avatar
      Button scripts: Check and warn about pygtk2 instead of crashing. · 6b5f2993
      Murray Cumming authored
      * glom/libglom/utils.[h|cc]: Add script_check_for_pygtk().
      * Makefile_tests.am:
      * tests/test_script_check_for_problems.cc: Add a test for the check
      function.
      * glom/mode_data/box_data.cc: execute_button_script(): Show a
      warning dialog, and do not run the script, if it seems to use pygtk.
      This should help with but #669196 (alien) and ##661766 (Andre Klapper) .
      6b5f2993
    • Murray Cumming's avatar
      Reports: Make summary fields work again. · f0c2ed90
      Murray Cumming authored
      * glom/libglom/report_builder.cc: report_build_summary():
      Remove any sort clause (ORDER BY) from the FoundSet because that makes
      no sense for a single row with summary fields. It looks like recent versions
      of PostgreSQL have become more strict about this, producing this error, for
      instance:
      column invoices.invoice_id must appear in the GROUP BY clause or be used in an aggregate function
      * Makefile_tests.am:
      * tests/test_selfhosting_new_then_report_summary.cc: Add a test for this.
      This fixes bug #669281 (alien)
      f0c2ed90
  16. 01 Feb, 2012 2 commits
    • Murray Cumming's avatar
      Add test_selfhosting_new_empty_then_users · 68ad8059
      Murray Cumming authored
      * glom/mode_design/users/dialog_groups_list.cc: on_button_group_new():
      Move the group creation code to:
      * glom/libglom/db_utils.[h|cc]:
      
      * glom/libglom/privs.[h|cc]: set_table_privileges():
      Return a bool to report failures.
      * Makefile_tests.am:
      * tests/test_selfhosting_new_empty_then_users.cc: Add this test to
      test simple creation of a group and a user.
      68ad8059
    • Murray Cumming's avatar
      Add test_selfhosting_new_from_example_operator. · 9c67be8d
      Murray Cumming authored
      * glom/base_db.[h|cc]: Move add_user() to
      * glom/libglom/db_utils.[h|cc]:
      * glom/frame_glom.cc:
      * glom/mode_design/users/dialog_users_list.cc: Adapted.
      
      * glom/libglom/connectionpool.cc: invalidate_connection():
      Also clear m_pFieldTypes to make sure that we refill it when making
      a new connection.
      
      * glom/libglom/data_structure/fieldtypes.[h|cc]: Add get_types_count().
      * tests/test_selfhosting_utils.[h|cc]: Add test_selfhost() to
      start an already-existing .glom system.
      * Makefile_tests.am:
      * tests/test_selfhosting_new_from_example_operator.cc:
      Add this new test which attempts to re-open a .glom system as
      a non-developer user. This currently fails to get the list of
      tables from the database. I must investigate that.
      9c67be8d
  17. 30 Jan, 2012 2 commits
  18. 27 Jan, 2012 1 commit
    • Murray Cumming's avatar
      Test creation from examples in non-English locales. · a83bd818
      Murray Cumming authored
      * Makefile_tests.am:
      * tests/test_selfhosting_new_from_example_in_locales.sh:
      Run the test_selfhosting_new_from_example example in various
      locales, to make sure that the libgda problem (see bug #668346),
      or something like it, does not come back.
      * tests/test_selfhosting_new_from_example.cc: Call setlocale().
      a83bd818
  19. 09 Jan, 2012 1 commit
    • Murray Cumming's avatar
      Translations: Offer non-country-specific language locales too. · fbefdf71
      Murray Cumming authored
      * Makefile_tests.am:
      * glom/libglom/utils.cc: locale_language_id(): Parse language-only
      locale IDs too.
      * glom/mode_design/iso_codes.cc: get_locale_name(): Create non-country
      locale IDs too, though they are not in the iso-codes XML file.
      * glom/mode_design/translation/window_translations.cc: Show, for instance
      German (de) as well as the existing German (Germany), German (Austria),
      etc.
      fbefdf71
  20. 07 Jan, 2012 1 commit
    • Murray Cumming's avatar
      Move po file (gettext) import and export into libglom and test it. · ffd6bd9a
      Murray Cumming authored
      * glom/mode_design/translation/window_translations.[h|cc]:
      load_from_document(), save_to_document(): Move the collecting of
      translatable items to:
      * glom/libglom/document/document.[h|cc]: get_translatable_items();
      Also move the gettext/po import/export to:
      * Makefile_libglom.am:
      * glom/libglom/filelist.am:
      * glom/libglom/translations_po.[h|cc]: write_translations_to_po_file()
      and import_translations_from_po_file().
      
      * Makefile_tests.am
      * tests/translations_po/data/test.po:
      * tests/translations_po/test_document_export_po.cc:
      * tests/translations_po/test_document_import_po.cc: Add tests of the new
      libglom functions.
      
      * Makefile_glom.am
      * glom/glom_export_po.cc: Added a new command-line tool that uses the
      new libglom API.
      ffd6bd9a
  21. 13 Dec, 2011 2 commits
    • Murray Cumming's avatar
      Correct parsing of example data. · d6caa3c4
      Murray Cumming authored
      * glom/libglom/data_structure/field.[h|cc]: to_file_format(),
      from_file_format() documentation: Mention that this uses CSV format.
      from_file_format(): Unescape double quotes, because we escape quotes
      as that in to_file_format().
      This avoids reading them as double quotes when opening an example file.
      This will also correct the interpretation of text default values.
      * Makefile_tests.am:
      * tests/test_field_file_format.cc: Add a test of this for text and image
      data, checking that what we write is what we read.
      d6caa3c4
    • Murray Cumming's avatar
      test_selfhosting_new_then_image: Move some code to test_utils. · 2b58f667
      Murray Cumming authored
      	* Makefile_tests.am:
      	* tests/test_selfhosting_new_then_image.cc: Move the test image-loading
      	code to:
      	* tests/test_utils.[h|cc]: get_value_for_image().
      2b58f667
  22. 07 Dec, 2011 1 commit
    • Murray Cumming's avatar
      Add a test that resaves (temporarily) all examples and checks the result. · ae46add8
      Murray Cumming authored
      	* Makefile_tests.am:
      	* tests/test_document_load_and_save.cc: Load a file and save it,
      	then check the saved file against the DTD.
      	* tests/test_document_load_and_save_all.sh: Run that test on all
      	example files.
      	* glom/glom_document.dtd: data_layout_notebook: Mention trans_set,
      	so that this test succeeds.
      ae46add8
  23. 05 Dec, 2011 1 commit
  24. 03 Dec, 2011 2 commits
  25. 02 Dec, 2011 1 commit
  26. 01 Dec, 2011 1 commit
    • Murray Cumming's avatar
      Moved some lookup functions into DbUtils and added a test for them. · f94998a4
      Murray Cumming authored
      	* glom/libglom/db_utils.[h|cc]:
      	* glom/base_db.[h|cc]: Moved get_fields_for_table(),
      	get_fields_for_table_one_field(), get_lookup_fields(), and
      	get_lookup_value() to the DbUtils namespace, taking an extra
      	Document parameter.
      	* glom/libglom/document/document.[h|cc]: Moved get_lookup_fields() to
      	DbUtils too.
      
      	* glom/base_db_table_data.cc
      	* glom/mode_data/box_data.cc
      	* glom/mode_data/box_data_calendar_related.cc
      	* glom/mode_data/box_data_details.cc
      	* glom/mode_data/box_data_list_related.cc
      	* glom/mode_data/db_adddel/db_adddel.cc
      	* glom/mode_design/box_db_table_relationships.cc
      	* glom/mode_design/fields/box_db_table_definition.cc
      	* glom/mode_design/fields/dialog_fielddefinition.cc
      	* glom/mode_design/layout/dialog_layout_list_related.cc
      	* glom/print_layout/canvas_print_layout.cc: Adapted. This shows how
      	often we call this very inefficient function. It would be better to
      	just make sure that the document has up-to-date information from the
      	database and just use the Document's information.
      
      	* Makefile_tests.am:
      	* tests/test_selfhosting_new_then_lookup.cc: Added a new test of
      	these functions, including retrieval of a lookup value.
      f94998a4
  27. 29 Nov, 2011 1 commit
    • Murray Cumming's avatar
      Add a test for changing of a field name. · e7988568
      Murray Cumming authored
      * tests/Makefile.am:
      * tests/test_document_load_and_change.cc: Change a field name and
      make sure that it has updated throughout the document.
      However, we still need to check lookups and related fields.
      e7988568
  28. 28 Nov, 2011 1 commit
  29. 16 Nov, 2011 1 commit
    • Murray Cumming's avatar
      Enable the test for dates in various locales. · d7898882
      Murray Cumming authored
      * Makefile_tests.am:
      * tests/test_glom_date_in_locales.sh: I don't like requiring
      installation of these locales during make check, but I see no other
      way to stop the fixes from being lost by careless translators, at
      least of the major languages.
      d7898882
  30. 10 Nov, 2011 2 commits
    • Murray Cumming's avatar
      Added ConnectionPool::set_fake_connection(). · 62fc98c8
      Murray Cumming authored
      * glom/libglom/connectionpool_backends/backend.h: connect():
      * glom/libglom/connectionpool_backends/postgres.[h|cc]: connect(),
      attempt_connect():
      * glom/libglom/connectionpool_backends/postgres_central.[h|cc]: connect():
      * glom/libglom/connectionpool_backends/postgres_self.[h|cc]: connect():
      * glom/libglom/connectionpool_backends/sqlite.[h|cc]: connect():
      Add a bool fake_connection parameter and use Gnome::Gda::create_with_string()
      instead of open_with_string() if it is true.
      * glom/libglom/connectionpool.[h|cc]: Add set_fake_connection() to set
      that bool and other things needed to make it work.
      
      * Makefile_tests.am:
      * tests/test_fake_connection.cc: Added a test that uses this for the
      intended purpose of getting a suitable SQL query string without an open
      connection.
      However, it does not currently work as expected due to:
      http://mail.gnome.org/archives/gnome-db-list/2011-November/msg00007.html
      62fc98c8
    • Murray Cumming's avatar
      Escape database connection details properly. · 6d313884
      Murray Cumming authored
      * glom/libglom/db_utils.[h|cc]: Added gda_cnc_string_encode() for use
      with GdaConnection's cnc_string and auth_string, for instance to
      escape the database directory, name, username, and password.
      * glom/libglom/connectionpool_backends/postgres.cc:
      * glom/libglom/connectionpool_backends/postgres_self.cc:
      * glom/libglom/connectionpool_backends/sqlite.cc: Properly escape the
      cnc_string and auth_string key values.
      
      * tests/test_selfhosting_utils.cc: test_create_and_selfhost_from_example(),
      test_create_and_selfhost_from_uri(): Add an optional subdirectory parameter
      that we can use to force weird parts into the path.
      * Makefile_tests.am:
      * tests/test_selfhosting_new_from_example_strangepath.cc: Add a
      test case that uses a path with some weird characters. This now works
      thanks to the above changes.
      6d313884