Skip to content

Conversation

@zonuexe
Copy link
Member

@zonuexe zonuexe commented May 17, 2019

Before

スクリーンショット 2019-05-17 15 45 57

After

スクリーンショット 2019-05-17 15 45 49

@zonuexe zonuexe force-pushed the support-magical-constants branch from 8acdefe to c4e30e7 Compare May 17, 2019 06:47
(should (eq 'php-constant
(get-text-property (point) 'face))))))
(should (equal (cons variable 'php-constant)
(cons variable (get-text-property (point) 'face)))))))
Copy link
Member Author

@zonuexe zonuexe May 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To improve the visibility of test results:

Before

Test php-mode-test-constants condition:
    (ert-test-failed
     ((should
       (eq 'php-constant
	    (get-text-property ... ...)))
      :form
      (eq php-constant php-magical-constant)
      :value nil))

After

Test php-mode-test-constants condition:
    (ert-test-failed
     ((should
       (equal
	(cons variable ...)
	(cons variable ...)))
      :form
      (equal
       ("class;" . php-constant)
       ("class;" . php-magical-constant))
      :value nil :explanation
      (cdr
       (different-atoms php-constant php-magical-constant))))

@zonuexe
Copy link
Member Author

zonuexe commented May 17, 2019

NOTE: __COMPILER_HALT_OFFSET__ is similar to a magical constant, but it is not. It is possible to add it to the list but I am lost.

<?php

echo __COMPILER_HALT_OFFSET__, PHP_EOL;
echo \__COMPILER_HALT_OFFSET__, PHP_EOL;

__halt_compiler();

https://3v4l.org/Ot9M0

@zonuexe zonuexe merged commit 242430b into master May 17, 2019
@zonuexe zonuexe deleted the support-magical-constants branch May 17, 2019 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants