summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test/context.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-31 14:13:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-31 14:13:46 +0000
commite47e8074c62d8c68b722301c9142aef375d21bb4 (patch)
tree7b28cfa8adedad46c8cd5b54c6775ac0ae11349e /perl_checker.src/test/context.t
parent6c3ff2fa5aa3b9ebab711350c558df6608e175d4 (diff)
downloadperl-MDK-Common-e47e8074c62d8c68b722301c9142aef375d21bb4.tar
perl-MDK-Common-e47e8074c62d8c68b722301c9142aef375d21bb4.tar.gz
perl-MDK-Common-e47e8074c62d8c68b722301c9142aef375d21bb4.tar.bz2
perl-MDK-Common-e47e8074c62d8c68b722301c9142aef375d21bb4.tar.xz
perl-MDK-Common-e47e8074c62d8c68b722301c9142aef375d21bb4.zip
add tests for perl_checker
Diffstat (limited to 'perl_checker.src/test/context.t')
-rw-r--r--perl_checker.src/test/context.t15
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)