diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2008-03-10 00:03:28 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2008-03-10 00:03:28 +0000 |
| commit | 5421346cad32ea60be596291c74200bed21c2ef2 (patch) | |
| tree | aaa13c90610c1e087007608851b36dc1f24e1f82 /src/extension/script/bindtest.cpp | |
| parent | Don't steal 'del' key in pen context when there is no curve being drawn (clos... (diff) | |
| download | inkscape-5421346cad32ea60be596291c74200bed21c2ef2.tar.gz inkscape-5421346cad32ea60be596291c74200bed21c2ef2.zip | |
Switch to newer binding stuff
(bzr r5016)
Diffstat (limited to 'src/extension/script/bindtest.cpp')
| -rw-r--r-- | src/extension/script/bindtest.cpp | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/extension/script/bindtest.cpp b/src/extension/script/bindtest.cpp deleted file mode 100644 index 97970381d..000000000 --- a/src/extension/script/bindtest.cpp +++ /dev/null @@ -1,86 +0,0 @@ - -#include <stdio.h> - -#include "InkscapeScript.h" - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - -static char *pythonCodeStr = -//"\n" -//"inkscape = _inkscape_py.getInkscape()\n" -"desktop = inkscape.getDesktop()\n" -"document = desktop.getDocument()\n" -"document.hello()\n" -""; - -int testPython() -{ - Inkscape::Extension::Script::InkscapeScript scriptEngine; - printf("##### Python Test #####\n"); - printf("===== CODE ====\n%s\n==============\n", pythonCodeStr); - scriptEngine.interpretScript(pythonCodeStr, - Inkscape::Extension::Script::InkscapeScript::PYTHON); - printf("##### End Python #####\n\n"); - return TRUE; -} - -static char *perlCodeStr = -//"\n" -//"$inkscape = inkscape_perlc::getInkscape();\n" -"print \"inkscape: '$inkscape'\\n\"; \n" -"$desktop = $inkscape->getDesktop();\n" -"$document = $desktop->getDocument();\n" -"$document->hello()\n" -//"reverse 'rekcaH lreP rehtonA tsuJ'\n" -""; - -int testPerl() -{ - Inkscape::Extension::Script::InkscapeScript scriptEngine; - printf("##### Perl Test #####\n"); - printf("===== CODE ====\n%s\n==============\n", perlCodeStr); - scriptEngine.interpretScript(perlCodeStr, - Inkscape::Extension::Script::InkscapeScript::PERL); - printf("##### End Perl #####\n\n"); - return TRUE; -} - - - -int doTest() -{ - if (!testPython()) - { - printf("Failed Python test\n"); - return FALSE; - } - if (!testPerl()) - { - printf("Failed Perl test\n"); - return FALSE; - } - return TRUE; -} - - - -int main(int argc, char **argv) -{ - - if (doTest()) - printf("Tests succeeded\n"); - else - printf("Tests failed\n"); - return 0; -} - - - - - - |
