#!/usr/bin/env rexx
/* test_orxncurses.rex - Test library initialization and basic function */

/* Call RxFuncAdd "OrxNcurses","orxncurses","OrxNcurses" */

do
    /* Try to register the package */
    pkg = RexxGetPackage("orxncurses")
    if pkg \= .nil then say "Package registered: " pkg
    else say "Package registration failed"

    /* Test a simple function */
    version = OrxCurVersion()
    say "Orxncurses version: " version

    /* Try initializing ncurses */
    call OrxCurInitscr
    say "Initscr succeeded!"
    call OrxCurEndwin
end

catch error
    say "Error:" error~message
exit

/* ::requires "orxncurses" LIBRARY */