[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode a530988fe0 134/212: Added more failing indent
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode a530988fe0 134/212: Added more failing indent tests |
Date: |
Wed, 26 Jan 2022 01:51:13 -0500 (EST) |
branch: externals/phps-mode
commit a530988fe0fefe040d6a5ba2d296d7fe3fa35596
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Added more failing indent tests
---
test/phps-mode-test-indent.el | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/test/phps-mode-test-indent.el b/test/phps-mode-test-indent.el
index 69c1c7a783..e7974399b4 100644
--- a/test/phps-mode-test-indent.el
+++ b/test/phps-mode-test-indent.el
@@ -272,6 +272,34 @@
"<?php\n\nif (false) {\n if (true) {\n $conversion =
myFunction(\n $weight,\n $weightUnit,\n
$toWeightUnit\n );\n }\n}"
"Nested multi-line assignment from function call")
+ (phps-mode-test-indent--should-equal
+ "<?php\n$var = [\n 1,\n 2,\n 3\n];\n"
+ "Square bracket array definition in assignment")
+
+ (phps-mode-test-indent--should-equal
+ "<?php\n/** @define string _PRIVATE_ROOT_ Absolute root to
private */\ndefine('_PRIVATE_ROOT_',\n
dirname($parameters[self::PARAMETER_SITE_PATH]) . DIRECTORY_SEPARATOR);\n"
+ "Mutiline define statement")
+
+ (phps-mode-test-indent--should-equal
+ "<?php\nif ($useRuntimeCache\n && self::isWritingnabled()\n &&
\\Aomebo\\Cache\\System::cacheExists(\n $cacheParameters,\n
$cacheKey,\n
\\Aomebo\\Cache\\System::CACHE_STORAGE_LOCATION_FILESYSTEM)\n) {\n"
+ "Multiline if condition")
+
+ (phps-mode-test-indent--should-equal
+ "<?php\nif ($data = \\Aomebo\\Cache\\System::loadCache(\n
$cacheParameters,\n $cacheKey,\n
\\Aomebo\\Cache\\System::FORMAT_SERIALIZE,\n
\\Aomebo\\Cache\\System::CACHE_STORAGE_LOCATION_FILESYSTEM)\n) {\n"
+ "Multiline if-condition with assignment")
+
+ (phps-mode-test-indent--should-equal
+ "<?php\n\nThrow new \\Exception(\n sprintf(\n
self::systemTranslate(\n 'Something went wrong when including file
\"%s\", error: \"%s\".'\n ),\n $tryPath,\n
$e->getMessage()\n )\n);\n"
+ "Multiline exception throwing")
+
+ (phps-mode-test-indent--should-equal
+ "<?php\n/**\n * @param string $key\n * @param bool [$reloadFromFilesystem
= false]\n * @return mixed\n */\nfunction getApplicationData($key,\n
$reloadFromFilesystem = false)\n{\n if (!empty($key)) {\n if
(!empty($reloadFromFilesystem)) {\n self::loadApplicationData();\n
}\n if (isset(self::$_applicationData[$key])) {\n return
self::$_applicationData[$key];\n }\n }\n return null;\n}\n"
+ "Function definition not in PSR-2 style")
+
+ (phps-mode-test-indent--should-equal
+ "<?php\nself::addAutoLoadPaths(array(\n _SYSTEM_ROOT_,\n
_PRIVATE_ROOT_,\n _PUBLIC_ROOT_,\n _SITE_ROOT_\n));\n"
+ "Multiline function call with multiline array as argument")
+
)
(defun phps-mode-test-indent--get-lines-indent-psr-2 ()
- [elpa] externals/phps-mode bc5039e32f 086/212: Created custom determine string indentation function, (continued)
- [elpa] externals/phps-mode bc5039e32f 086/212: Created custom determine string indentation function, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode daff4ad5e0 085/212: More work on indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode b82475c697 090/212: Passed token-blind indentation for multi-line class extends and implements, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2ea2360c3e 091/212: Created indent helper functions, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode df91b8e433 117/212: More handling of string-doc indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 6fac0d5585 102/212: Passed indent test for heredoc string, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1af63142f3 127/212: Fixed incremental issue with new SDT based bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3565c7efb3 125/212: Fixed byte-compilation warnings for indent file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on line after equal operator in if condition list, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode dece7f242e 160/212: Added more failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a530988fe0 134/212: Added more failing indent tests,
Christian Johansson <=
- [elpa] externals/phps-mode 8c1f529f87 145/212: Passing indent for line after ending of statement / expression with trailing closing bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d7aa22d251 146/212: Added two new failing tests for indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode c453932f32 139/212: Added TODO item, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8374026917 166/212: Improved indentation on lines starting with a closing square bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2afb7dc87a 002/212: Generating basic imenu-index via parser SDT, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 41b1566c40 010/212: Imenu generation via parser SDT passing more tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8f9870fb9b 013/212: Parser SDT does not use global variables, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 4753734b0a 006/212: Moved syntax coloring to separate file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d037aa09bc 023/212: Added bookkeeping via parser SDT foreach ($x as $y) {}, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3d54b6ff01 022/212: Passed another test for bookkeeping generated via parser SDT, Christian Johansson, 2022/01/26