fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / t / compilers / pge / pge-hs.t
blob51099eba192b69b808f8008c6785283acdcd90b2
1 #!./parrot
2 # Copyright (C) 2001-2010, Parrot Foundation.
3 # $Id$
5 =head1 NAME
7 t/library/pge-hs.t
9 =head1 SYNOPSIS
11         % prove t/library/pge-hs.t
13 =head1 DESCRIPTION
15 Grammar Engine Haskell Output tests
17 =cut
19 # 1
20 .sub main :main
21     .include 'test_more.pir'
22     plan(1)
24     test_pge_hs_match()
25 .end
27 .sub test_pge_hs_match
28     .local pmc match, add_rule
29     .local string result
31     load_bytecode "PGE.pbc"
32     load_bytecode "PGE/Hs.pir"
34     match = get_global ['PGE';'Hs'], "match"
35     add_rule = get_global ['PGE';'Hs'], "add_rule"
36     add_rule("foo", "s")
37     result = match("test", "t(.<foo>)t")
38     eq result, "PGE_Match 0 4 [PGE_Match 1 3 [] [(\"foo\", PGE_Match 2 3 [] [])]] []\n", OK
39     ok(0, 'PGE::Hs match')
40     .return()
41   OK:
42     ok(1, 'PGE::Hs match')
43 .end
45 # Local Variables:
46 #   mode: pir
47 #   fill-column: 100
48 # End:
49 # vim: expandtab shiftwidth=4 ft=pir: