emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 76182f4b93f: ; cperl-mode-resources: More test cases for cperl-mo


From: Harald Jörg
Subject: master 76182f4b93f: ; cperl-mode-resources: More test cases for cperl-mode.el
Date: Fri, 30 Jun 2023 17:49:51 -0400 (EDT)

branch: master
commit 76182f4b93f2739caa7c2209d785d1b528f6601e
Author: Harald Jörg <haj@posteo.de>
Commit: Harald Jörg <haj@posteo.de>

    ; cperl-mode-resources: More test cases for cperl-mode.el
    
    * test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl:
    Adapt to the signatures now available in cperl-mode.el
---
 .../progmodes/cperl-mode-resources/proto-and-attrs.pl  | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl 
b/test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl
index 7138bf631df..6ed5c0dfc41 100644
--- a/test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl
+++ b/test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl
@@ -12,12 +12,10 @@ no warnings 'experimental::signatures';
 # are somewhat frowned upon most of the times, but they are required
 # for some Perl magic
 
-# FIXME: 2022-02-02 CPerl mode does not handle subroutine signatures.
-# In simple cases it mistakes them as prototypes, when attributes are
-# present, it doesn't handle them at all.  Variables in signatures
-# SHOULD be fontified like variable declarations.
-
 # Part 1: Named subroutines
+# A plain named subroutine without any optional stuff
+sub sub_0 { ...; }
+
 # A prototype and a trivial subroutine attribute
 {
     no feature 'signatures'; # that's a prototype, not a signature
@@ -30,10 +28,16 @@ sub sub_2 :prototype($) { ...; }
 # A signature (these will soon-ish leave the experimental state)
 sub sub_3 ($foo,$bar) { ...; }
 
-# Attribute plus signature FIXME: Not yet supported
-sub bad_sub_4 :prototype($$$) ($foo,$bar,$baz) { ...; }
+# Attribute plus signature
+sub sub_4 :prototype($$$) ($foo,$bar,$baz) { ...; }
+
+# A signature with a trailing comma (weird, but legal)
+sub sub_5 ($foo,$bar,) { ...; }
 
 # Part 2: Same constructs for anonymous subs
+# A plain named subroutine without any optional stuff
+my $subref_0 = sub { ...; }
+
 # A prototype and a trivial subroutine attribute
 {
     no feature 'signatures'; # that's a prototype, not a signature



reply via email to

[Prev in Thread] Current Thread [Next in Thread]