~~NOCACHE~~ ====== Tests: Prolog interface ====== * //Delete file ''lib/plugins/loki/temp/loki/tests/prolog.txt'' before tests// * Tests are performed manually - you have to compare if sections "Expected result" and "Actual result" represent the same thing! ===== Simple goal ===== **Description:** Simple Prolog goal for knowledge saved inside '''' tag. Note that knowledge is not saved in cache! **Code:** woman(kate). man(john). **Expected result:** kate **Actual result:** woman(kate). man(john). ===== Goal and scope ===== **Description:** Knowledge saved (''cache="true"'') inside one '''' tag and used inside other '''' tag with specified scope. **Code:** man(jack). man(jim). **Expected result:** jack jim Note that ''john'' **should not** appear because this fact should not be saved in cache! (it is from previous test) **Actual result:** man(jack). man(jim). ===== Predicates ===== **Description:** List all predicates in specified scope. **Code:** % **Expected result:** The list similar to the one shown below. It must contain predicates: ''man'', ''wiki_header''. absolute_file_name atom_concat ->atomic_list_concat ;atomic_list_concat expand_answer expand_file_name expand_query file_search_path library_directory link_xpce:pcehome_ man '$member' '$pack':pack_dir prolog_file_type system:current_prolog_flag '$toplevel':catch toplevel_variables:expand_answer toplevel_variables:expand_query wiki_header **Actual result:** % ---- **Description:** Show info about specified predicate in specified scope. **Code:** % **Expected result:** man(jack). man(jim). **Actual result:** % ===== Errors ===== **Description:** Error messages for Prolog code **Code:** **Expected result:** Errors list that contains (probably at the end): ERROR: Prolog initialisation failed: ERROR: ignore/1: Undefined procedure: invalid_goal/0 **Actual result:**