diff options
| author | Pascal Rigaux <pixel@mandriva.com> | 2004-03-31 14:13:46 +0000 |
|---|---|---|
| committer | Pascal Rigaux <pixel@mandriva.com> | 2004-03-31 14:13:46 +0000 |
| commit | 492dd716bdbd866fc28eacfe5082910dfa9e7590 (patch) | |
| tree | 15bad6962ad73c62835002aadf44dd2163c69282 /perl_checker.src/test/context.t | |
| parent | 5a13ba64777f14718ae20e4bca2a80f39304c367 (diff) | |
| download | perl_checker-492dd716bdbd866fc28eacfe5082910dfa9e7590.tar perl_checker-492dd716bdbd866fc28eacfe5082910dfa9e7590.tar.gz perl_checker-492dd716bdbd866fc28eacfe5082910dfa9e7590.tar.bz2 perl_checker-492dd716bdbd866fc28eacfe5082910dfa9e7590.tar.xz perl_checker-492dd716bdbd866fc28eacfe5082910dfa9e7590.zip | |
add tests for perl_checker
Diffstat (limited to 'perl_checker.src/test/context.t')
| -rw-r--r-- | perl_checker.src/test/context.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/perl_checker.src/test/context.t b/perl_checker.src/test/context.t new file mode 100644 index 0000000..5fd7809 --- /dev/null +++ b/perl_checker.src/test/context.t @@ -0,0 +1,15 @@ +foreach (%h) {} foreach with a hash is usually an error + +map { 'xxx' } %h a hash is not a valid parameter to function map + +$xxx = ('yyy', 'zzz') context tuple(string, string) is not compatible with context scalar + +@l ||= 'xxx' "||=" is only useful with a scalar + +length @l never use "length @l", it returns the length of the string int(@l) + +%h . 'yyy' context hash is not compatible with context string + +'xxx' > 'yyy' you should use a string operator, not the number operator ">" + +1 cmp 2 you should use a number operator, not the string operator "cmp" (or replace the number with a string) |
