1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 04:45:41 +02:00

tests: add scripting API tests (issue #104)

Automatic tests of scripting API are made with Python scripts:

- unparse.py: convert Python code to other languages
- testapigen.py: generate scripts in all languages to test the API
- testapi.py scripting API tests
This commit is contained in:
Sébastien Helleu
2017-10-07 16:51:25 +02:00
parent f6fe6be7a4
commit e8af853624
11 changed files with 2122 additions and 18 deletions
+3
View File
@@ -31,6 +31,9 @@ script:
- msgcheck po/*.po
- pylint --version
- pylint doc/docgen.py
- pylint tests/scripts/python/testapigen.py
- pylint tests/scripts/python/testapi.py
- pylint tests/scripts/python/unparse.py
after_success:
- weechat --help
+6 -5
View File
@@ -49,7 +49,8 @@ Bug fixes::
Tests::
* display an error if the required locale en_US.UTF-8 is not installed
* scripts: add scripting API tests (issue #104)
* unit: display an error if the required locale en_US.UTF-8 is not installed
[[v1.9.1]]
== Version 1.9.1 (2017-09-23)
@@ -330,8 +331,8 @@ Documentation::
Tests::
* add a test to check if all plugins are loaded
* fix locale used to execute tests (issue #631)
* unit: add a test to check if all plugins are loaded
* unit: fix locale used to execute tests (issue #631)
Build::
@@ -564,7 +565,7 @@ Bug fixes::
Tests::
* fix memory leak in tests launcher
* unit: fix memory leak in tests launcher
Build::
@@ -735,7 +736,7 @@ Build::
Tests::
* add unit tests using CppUTest
* unit: add unit tests using CppUTest (issue #104)
[[v0.4.3]]
== Version 0.4.3 (2014-02-09)
+9 -1
View File
@@ -88,6 +88,8 @@ The main WeeChat directories are:
|       trigger/ | Trigger plugin.
|       xfer/ | Xfer plugin (IRC DCC file/chat).
| tests/ | Tests.
|    scripts/ | Scripting API tests.
|       python/ | Python scripts to generate and run the scripting API tests.
|    unit/ | Unit tests.
|       core/ | Unit tests for core functions.
| doc/ | Documentation.
@@ -339,7 +341,13 @@ WeeChat "core" is located in following directories:
|===
| Path/file | Description
| tests/ | Root of tests.
|    tests.cpp | Program used to run tests.
|    tests.cpp | Program used to run all tests.
|    scripts/ | Root of scripting API tests.
|       test-scripts.cpp | Program used to run the scripting API tests.
|       python/ | Python scripts to generate and run the scripting API tests.
|          testapigen.py | Python script generating scripts in all languages to test the scripting API.
|          testapi.py | Python script with scripting API tests, used by script testapigen.py.
|          unparse.py | Convert Python code to other languages, used by script testapigen.py.
|    unit/ | Root of unit tests.
|       core/ | Root of unit tests for core.
|          test-arraylist.cpp | Tests: arraylists.
+9 -1
View File
@@ -90,6 +90,8 @@ Les répertoires principaux de WeeChat sont :
|       trigger/ | Extension Trigger.
|       xfer/ | Extension Xfer (IRC DCC fichier/discussion).
| tests/ | Tests.
|    scripts/ | Tests de l'API script.
|       python/ | Scripts Python pour générer et lancer les tests de l'API script.
|    unit/ | Tests unitaires.
|       core/ | Tests unitaires pour les fonctions du cœur.
| doc/ | Documentation.
@@ -341,7 +343,13 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|===
| Chemin/fichier | Description
| tests/ | Racine des tests.
|    tests.cpp | Programme utilisé pour lancer les tests.
|    tests.cpp | Programme utilisé pour lancer tous les tests.
|    scripts/ | Racine des tests de l'API script.
|       test-scripts.cpp | Programme utilisé pour lancer les tests de l'API script.
|       python/ | Scripts Python pour générer et lancer les tests de l'API script.
|          testapigen.py | Script Python générant des scripts dans tous les languages pour tester l'API script.
|          testapi.py | Script Python avec les tests API, utilisé par le script testapigen.py.
|          unparse.py | Conversion de code Python vers d'autres langages, utilisé par le script testapigen.py.
|    unit/ | Racine des tests unitaires.
|       core/ | Racine des tests unitaires pour le cœur.
|          test-arraylist.cpp | Tests : listes avec tableau (« arraylists »).
+11 -1
View File
@@ -94,6 +94,9 @@ qweechat::
|       trigger/ | trigger プラグイン
|       xfer/ | xfer (IRC DCC ファイル/チャット)
| tests/ | テスト
// TRANSLATION MISSING
|    scripts/ | Scripting API tests.
|       python/ | Python scripts to generate and run the scripting API tests.
|    unit/ | 単体テスト
|       core/ | コア関数の単体テスト
| doc/ | 文書
@@ -345,7 +348,14 @@ WeeChat "core" は以下のディレクトリに配置されています:
|===
| パス/ファイル名 | 説明
| tests/ | テスト用のルートディレクトリ
|    tests.cpp | テスト実行に使うプログラム
// TRANSLATION MISSING
|    tests.cpp | Program used to run all tests.
|    scripts/ | Root of scripting API tests.
|       test-scripts.cpp | Program used to run the scripting API tests.
|       python/ | Python scripts to generate and run the scripting API tests.
|          testapigen.py | Python script generating scripts in all languages to test the scripting API.
|          testapi.py | Python script with scripting API tests, used by script testapigen.py.
|          unparse.py | Convert Python code to other languages, used by script testapigen.py.
|    unit/ | 単体テスト用のルートディレクトリ
|       core/ | core 向け単体テスト用のルートディレクトリ
|          test-arraylist.cpp | テスト: 配列リスト
+3 -1
View File
@@ -39,6 +39,7 @@ set(LIB_WEECHAT_UNIT_TESTS_SRC
unit/core/test-url.cpp
unit/core/test-utf8.cpp
unit/core/test-util.cpp
scripts/test-scripts.cpp
)
add_library(weechat_unit_tests STATIC ${LIB_WEECHAT_UNIT_TESTS_SRC})
@@ -77,4 +78,5 @@ add_test(NAME unit
COMMAND tests -v)
set_property(TEST unit PROPERTY
ENVIRONMENT "WEECHAT_TESTS_ARGS=-p;"
"WEECHAT_EXTRA_LIBDIR=${PROJECT_BINARY_DIR}/src")
"WEECHAT_EXTRA_LIBDIR=${PROJECT_BINARY_DIR}/src;"
"WEECHAT_TESTS_SCRIPTS_DIR=${CMAKE_CURRENT_SOURCE_DIR}/scripts/python")
File diff suppressed because it is too large Load Diff
+408
View File
File diff suppressed because it is too large Load Diff
+1259
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+40 -9
View File
File diff suppressed because it is too large Load Diff