# --------------------------------------------------------------------------- # - TXT0007.als - # - afnix:txt module test unit - # --------------------------------------------------------------------------- # - This program is free software; you can redistribute it and/or modify - # - it provided that this copyright notice is kept intact. - # - - # - This program is distributed in the hope that it will be useful, but - # - without any warranty; without even the implied warranty of - # - merchantability or fitness for a particular purpose. In no event shall - # - the copyright holder be liable for any direct, indirect, incidental or - # - special damages arising in any way out of the use of this software. - # --------------------------------------------------------------------------- # - copyright (c) 1999-2007 amaury darsch - # --------------------------------------------------------------------------- # @info key test unit # @author amaury darsch # get the module interp:library "afnix-txt" # create a default key const key1 (afnix:txt:Key) assert true (afnix:txt:key-p key1) # create a default key by type const key2 (afnix:txt:Key afnix:txt:Key:K256) assert true (afnix:txt:key-p key2) # create a message key const key3 (afnix:txt:Key "hello world") assert true (afnix:txt:key-p key3) # get the key type and value const type (key3:get-type) const kval (key3:format) # create a message key by type const key4 (afnix:txt:Key type "hello world") assert true (afnix:txt:key-p key4) assert kval (key4:format)