phrep

Check-in [58129a2013]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added a few silly development tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:58129a2013766a0916c9e8acfc3a4b5599623325
User & Date: mario 2015-04-28 23:20:51
Context
2015-05-29
12:50
Update a few comments, release as 0.3.0. Leaf check-in: 6bd3a9efb0 user: mario tags: trunk, 0.3.0
2015-04-28
23:20
Added a few silly development tests. check-in: 58129a2013 user: mario tags: trunk
23:09
Set current as '0.2.9' (no release). check-in: 6c2466e1ae user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/Makefile.

15
16
17
18
19
20
21
22
23
24
25
26
27
# Test run the preprecossor
samples: $(SAMPLES:.ph=.t) $(INVALID:.wr=.t)
%.t: %.ph
	../phrep -v -W -i=$*.ph -o=- | cmp $*.cmp
%.rx: %.ph
	../phrep -v -W -i=$*.ph -o=- -mregex | cmp $*.cmp
%.t: %.wr
	@../phrep -v -W -i=$*.wr -o=- >/dev/null || echo $*: $(FAIL_OK) as expected

mkcmp: $(SAMPLES:.ph=.cmp)
%.cmp: %.ph # Create comparison for preproccessed files
	../phrep -v -W -i=$*.ph -o=$*.cmp








|





15
16
17
18
19
20
21
22
23
24
25
26
27
# Test run the preprecossor
samples: $(SAMPLES:.ph=.t) $(INVALID:.wr=.t)
%.t: %.ph
	../phrep -v -W -i=$*.ph -o=- | cmp $*.cmp
%.rx: %.ph
	../phrep -v -W -i=$*.ph -o=- -mregex | cmp $*.cmp
%.t: %.wr
	@../phrep -v -W -i=$*.wr -o=- 2>/dev/null || echo $*: $(FAIL_OK) as expected

mkcmp: $(SAMPLES:.ph=.cmp)
%.cmp: %.ph # Create comparison for preproccessed files
	../phrep -v -W -i=$*.ph -o=$*.cmp

Added test/a_exprargsdelim.ph.













>
>
>
>
>
>
1
2
3
4
5
6
<?php
// not supposed to generate valid code
=INLINE_MAX(1,"2,)",/*3,)*/);
=IFSET@($var["$x,"]);
// just testing the argument splitting in regex and tokenizer modes

Added test/a_is_int.ph.









>
>
>
>
1
2
3
4
#if is_int(is_int(is_int(1)))
 // really just a throwaway, only the first is_int should have worked
 x
#endif

Added test/a_pragma_rx.ph.









>
>
>
>
1
2
3
4
#pragma version 2.0.0
#if pragma("version") =~ 3.0 || pragma(version) == "2.0.0"
 x
#endif