* bug#70196: 30.0.50; sh-script-tests fails
@ 2024-04-04 13:37 Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 14:05 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-04 13:37 UTC (permalink / raw)
To: 70196
--8<---------------cut here---------------start------------->8---
# make -C test sh-script-tests
make: Entering directory '/home/albinus/src/emacs/test'
make[1]: Entering directory '/home/albinus/src/emacs/test'
GEN lisp/progmodes/sh-script-tests.log
Running 6 tests (2024-04-04 15:34:42+0200, selector `(not (or (tag :unstable) (tag :nativecomp)))')
No indentation for this shell type.
passed 1/6 sh-script-test-do-fontification (0.000686 sec)
No indentation for this shell type.
No indentation for this shell type.
No indentation for this shell type.
No indentation for this shell type.
No indentation for this shell type.
No indentation for this shell type.
No indentation for this shell type.
No indentation for this shell type.
passed 2/6 test-backward-token (0.001664 sec)
No indentation for this shell type.
Indenting region...
Indenting region...done
Test test-basic-sh-indentation backtrace:
signal(ert-test-failed (((should (equal (buffer-string) "myecho () {
ert-fail(((should (equal (buffer-string) "myecho () {\n echo foo\
(if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
(let (form-description-9) (if (unwind-protect (setq value-7 (apply f
(let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
(let* ((fn-5 #'equal) (args-6 (condition-case err (list (buffer-stri
(progn (insert "myecho () {\necho foo\n}\n") (shell-script-mode) (in
(unwind-protect (progn (insert "myecho () {\necho foo\n}\n") (shell-
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
(closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*" t
#f(compiled-function () #<bytecode 0x133292849dfa55dc>)()
handler-bind-1(#f(compiled-function () #<bytecode 0x133292849dfa55dc
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name test-basic-sh-indentation :documentat
ert-run-or-rerun-test(#s(ert--stats :selector (not ...) :tests [...
ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
command-line()
normal-top-level()
Test test-basic-sh-indentation condition:
(ert-test-failed
((should (equal (buffer-string) "myecho () {\n echo foo\n}\n"))
:form
(equal " myecho () {\n echo foo\n }\n"
"myecho () {\n echo foo\n}\n")
:value nil :explanation
(arrays-of-different-length 35 27
" myecho () {\n echo foo\n }\n"
"myecho () {\n echo foo\n}\n"
first-mismatch-at 0)))
FAILED 3/6 test-basic-sh-indentation (0.000458 sec) at lisp/progmodes/sh-script-tests.el:41
No indentation for this shell type.
Indenting region...
Indenting region...done
Test test-indent-after-continuation backtrace:
signal(ert-test-failed (((should (equal (buffer-string) "for f \\\n\
ert-fail(((should (equal (buffer-string) "for f \\\n\11in a; do \\\n
(if (unwind-protect (setq value-12 (apply fn-10 args-11)) (setq form
(let (form-description-14) (if (unwind-protect (setq value-12 (apply
(let ((value-12 'ert-form-evaluation-aborted-13)) (let (form-descrip
(let* ((fn-10 #'equal) (args-11 (condition-case err (list (buffer-st
(let ((sh-indent-after-continuation t)) (indent-region (point-min) (
(let ((sh-indent-for-continuation '++)) (let ((sh-indent-after-conti
(progn (insert "for f \\\nin a; do \\\ntoto; \\\ndone\n") (shell-scr
(unwind-protect (progn (insert "for f \\\nin a; do \\\ntoto; \\\ndon
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
(closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*" t
#f(compiled-function () #<bytecode 0x133292849dfa55dc>)()
handler-bind-1(#f(compiled-function () #<bytecode 0x133292849dfa55dc
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name test-indent-after-continuation :docum
ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
command-line()
normal-top-level()
Test test-indent-after-continuation condition:
(ert-test-failed
((should
(equal (buffer-string)
"for f \\\n\11in a; do \\\n toto; \\\n done\n"))
:form
(equal " for f \\\n in a; do \\\n toto; \\\n done\n"
"for f \\\n\11in a; do \\\n toto; \\\n done\n")
:value nil :explanation
(arrays-of-different-length 48 41
" for f \\\n in a; do \\\n toto; \\\n done\n"
"for f \\\n\11in a; do \\\n toto; \\\n done\n"
first-mismatch-at 0)))
FAILED 4/6 test-indent-after-continuation (0.000615 sec) at lisp/progmodes/sh-script-tests.el:55
No indentation for this shell type.
Indenting region...
Indenting region...done
Test test-indentation backtrace:
signal(ert-test-failed (("Mismatch in test \"sh-indents1\", file /ho
ert-fail(("Mismatch in test \"sh-indents1\", file /home/albinus/src/
ert-test--erts-test(((dummy . t) (code)) "/home/albinus/src/emacs/te
ert-test-erts-file("/home/albinus/src/emacs/test/lisp/progmodes/sh-s
(closure (t) nil (ert-test-erts-file (expand-file-name "sh-indents.e
#f(compiled-function () #<bytecode 0x133292849dfa55dc>)()
handler-bind-1(#f(compiled-function () #<bytecode 0x133292849dfa55dc
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name test-indentation :documentation nil :
ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
command-line()
normal-top-level()
Test test-indentation condition:
(ert-test-failed
("Mismatch in test \"sh-indents1\", file /home/albinus/src/emacs/test/lisp/progmodes/sh-script-resources/sh-indents.erts"
" if test;then\n something\n fi\n other\n"
"if test;then\n something\nfi\nother\n"))
FAILED 5/6 test-indentation (0.010179 sec) at lisp/progmodes/sh-script-tests.el:52
No indentation for this shell type.
Test test-sh-script-indentation backtrace:
signal(ert-test-failed (((should (equal (buffer-substring-no-propert
ert-fail(((should (equal (buffer-substring-no-properties (point-min)
(if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-de
(let (form-description-4) (if (unwind-protect (setq value-2 (apply f
(let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-descripti
(let* ((fn-0 #'equal) (args-1 (condition-case err (list (buffer-subs
(progn (insert "relative-path/to/configure --prefix=$prefix\\\n
(unwind-protect (progn (insert "relative-path/to/configure --prefix=
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
(let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
(closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*" t
#f(compiled-function () #<bytecode 0x133292849dfa55dc>)()
handler-bind-1(#f(compiled-function () #<bytecode 0x133292849dfa55dc
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name test-sh-script-indentation :documenta
ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
command-line()
normal-top-level()
Test test-sh-script-indentation condition:
(ert-test-failed
((should
(equal (buffer-substring-no-properties ... ...)
"relative-path/to/configure --prefix=$prefix\\\n\11\11\11 --with-x"))
:form
(equal
"relative-path/to/configure --prefix=$prefix\\\n --with-x"
"relative-path/to/configure --prefix=$prefix\\\n\11\11\11 --with-x")
:value nil :explanation
(arrays-of-different-length 66 59
"relative-path/to/configure --prefix=$prefix\\\n --with-x"
"relative-path/to/configure --prefix=$prefix\\\n\11\11\11 --with-x"
first-mismatch-at 45)))
FAILED 6/6 test-sh-script-indentation (0.000389 sec) at lisp/progmodes/sh-script-tests.el:28
Ran 6 tests, 2 results as expected, 4 unexpected (2024-04-04 15:34:43+0200, 0.392737 sec)
4 unexpected results:
FAILED test-basic-sh-indentation
FAILED test-indent-after-continuation
FAILED test-indentation
FAILED test-sh-script-indentation
--8<---------------cut here---------------end--------------->8---
In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-04-04 built on gandalf
Repository revision: 44d83def4fa046986ac6919ca53f789d01840ffa
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12302004
System Description: Fedora Linux 39 (Workstation Edition)
Configured using:
'configure --without-native-compilation'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8
Major mode: Lisp Interaction
Minor modes in effect:
display-time-mode: t
delete-selection-mode: t
icomplete-mode: t
global-goto-address-mode: t
goto-address-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
column-number-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs-guix hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-guix
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-browse
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-compat hides /home/albinus/.emacs.d/elpa/debbugs-0.39/debbugs-compat
/home/albinus/.emacs.d/elpa/helm-3.9.7/helm-packages hides /home/albinus/.emacs.d/elpa/helm-core-3.9.7/helm-packages
~/lisp/telepathy hides /home/albinus/.emacs.d/elpa/telepathy-20131209.1258/telepathy
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/.emacs.d/elpa/hydra-0.15.0/lv hides /home/albinus/.emacs.d/elpa/lv-0.15.0/lv
/home/albinus/.emacs.d/elpa/transient-20240201.1100/transient hides /home/albinus/src/emacs/lisp/transient
/home/albinus/src/tramp/lisp/tramp-sh hides /home/albinus/src/emacs/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-message hides /home/albinus/src/emacs/lisp/net/tramp-message
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /home/albinus/src/emacs/lisp/net/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-rclone hides /home/albinus/src/emacs/lisp/net/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-gvfs hides /home/albinus/src/emacs/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-cmds hides /home/albinus/src/emacs/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /home/albinus/src/emacs/lisp/net/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-cache hides /home/albinus/src/emacs/lisp/net/tramp-cache
/home/albinus/src/tramp/lisp/tramp-compat hides /home/albinus/src/emacs/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-ftp hides /home/albinus/src/emacs/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-container hides /home/albinus/src/emacs/lisp/net/tramp-container
/home/albinus/src/tramp/lisp/tramp-archive hides /home/albinus/src/emacs/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp-smb hides /home/albinus/src/emacs/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/tramp-uu hides /home/albinus/src/emacs/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-fuse hides /home/albinus/src/emacs/lisp/net/tramp-fuse
~/lisp/dbus hides /home/albinus/src/emacs/lisp/net/dbus
/home/albinus/src/tramp/lisp/trampver hides /home/albinus/src/emacs/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-androidsu hides /home/albinus/src/emacs/lisp/net/tramp-androidsu
/home/albinus/src/tramp/lisp/tramp-sshfs hides /home/albinus/src/emacs/lisp/net/tramp-sshfs
/home/albinus/src/tramp/lisp/tramp-integration hides /home/albinus/src/emacs/lisp/net/tramp-integration
/home/albinus/src/tramp/lisp/tramp hides /home/albinus/src/emacs/lisp/net/tramp
/home/albinus/src/tramp/lisp/tramp-crypt hides /home/albinus/src/emacs/lisp/net/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-adb hides /home/albinus/src/emacs/lisp/net/tramp-adb
Features:
(shadow sort mail-extr warnings emacsbug message yank-media puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils face-remap ob-shell ob ob-tangle ol
org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core org-cycle
org-fold org-fold-core ob-eval org-keys oc org-compat org-macs vc
vc-dispatcher time tramp-sh lxc-tramp lxd-tramp tramp trampver
tramp-integration files-x tramp-message help-mode tramp-compat xdg shell
pcomplete comint ansi-osc ring parse-time iso8601 time-date format-spec
ansi-color tramp-loaddefs rx delsel ido jka-compr icomplete cus-edit pp
cus-load wid-edit dired dired-loaddefs goto-addr thingatpt
alert-autoloads android-mode-autoloads auth-source-gopass-autoloads
auth-source-keytar-autoloads auth-source-kwallet-autoloads
auth-source-xoauth2-autoloads auto-sudoedit-autoloads
auto-virtualenv-autoloads auto-virtualenvwrapper-autoloads
boxquote-autoloads clang-format-autoloads company-shell-autoloads
company-autoloads counsel-toki-autoloads counsel-tramp-autoloads
counsel-autoloads dbus-codegen-autoloads debbugs-autoloads
dired-du-autoloads dired-rsync-autoloads dired-toggle-sudo-autoloads
direnv-autoloads disk-usage-autoloads dockerfile-mode-autoloads
editorconfig-charset-extras-autoloads
editorconfig-custom-majormode-autoloads
editorconfig-domain-specific-autoloads editorconfig-autoloads
editorconfig-generate-autoloads ednc-autoloads el-get-autoloads
envrc-autoloads etc-sudoers-mode-autoloads
exec-path-from-shell-autoloads fontaine-autoloads forge-autoloads
closql-autoloads emacsql-autoloads friendly-tramp-path-autoloads
fzf-autoloads ggtags-autoloads ghub-autoloads gited-autoloads
gitlab-ci-mode-flycheck-autoloads gitlab-ci-mode-autoloads
flycheck-autoloads gntp-autoloads gnus-desktop-notify-autoloads
helm-gitlab-autoloads helm-projectile-autoloads helm-autoloads
helm-core-autoloads async-autoloads ibuffer-tramp-autoloads
inheritenv-autoloads ivy-gitlab-autoloads gitlab-autoloads
journalctl-mode-autoloads keepass-mode-autoloads keytar-autoloads
kubernetes-autoloads log4e-autoloads lsp-java-autoloads
dap-mode-autoloads lsp-docker-autoloads bui-autoloads
lsp-latex-autoloads consult-autoloads lsp-treemacs-autoloads
lsp-mode-autoloads f-autoloads lxc-tramp-autoloads lxd-tramp-autoloads
magit-filenotify-autoloads magit-autoloads pcase git-commit-autoloads
magit-popup-autoloads magit-section-autoloads marcopolo-autoloads
mastodon-autoloads nexus-autoloads nnir-est-autoloads oauth2-autoloads
ob-restclient-autoloads orderless-autoloads persist-autoloads
pkg-info-autoloads epl-autoloads popup-autoloads projectile-autoloads
promise-autoloads pylint-autoloads python-environment-autoloads
deferred-autoloads pyvenv-autoloads
recentf-remove-sudo-tramp-prefix-autoloads request-autoloads
restclient-test-autoloads restclient-autoloads s3ed-autoloads finder-inf
slime-autoloads macrostep-autoloads spinner-autoloads
ssh-deploy-autoloads su-autoloads sudo-edit-autoloads sudo-ext-autoloads
sudo-utils-autoloads swiper-autoloads ivy-autoloads sx-autoloads
markdown-mode-autoloads telepathy-autoloads totp-autoloads
totp-auth-autoloads base32-autoloads tramp-theme-autoloads
transient-dwim-autoloads transient-autoloads treemacs-autoloads
cfrs-autoloads posframe-autoloads ht-autoloads pfuture-autoloads
ace-window-autoloads avy-autoloads treepy-autoloads uuid-autoloads
vdiff-autoloads hydra-autoloads lv-autoloads vertico-autoloads
virtualenv-autoloads virtualenvwrapper-autoloads s-autoloads
dash-autoloads web-server-autoloads wfnames-autoloads info
with-editor-autoloads yaml-autoloads yaml-mode-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs icons
password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs)
Memory information:
((conses 16 149978 17443)
(symbols 48 16181 0)
(strings 32 49285 2671)
(string-bytes 1 1546121)
(vectors 16 22734)
(vector-slots 8 229240 3876)
(floats 8 78 211)
(intervals 56 422 0)
(buffers 992 11))
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 13:37 bug#70196: 30.0.50; sh-script-tests fails Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-04 14:05 ` Eli Zaretskii
2024-04-04 14:32 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-04-04 14:05 UTC (permalink / raw)
To: Michael Albinus; +Cc: 70196
> Date: Thu, 04 Apr 2024 15:37:26 +0200
> From: Michael Albinus via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Test test-basic-sh-indentation backtrace:
> signal(ert-test-failed (((should (equal (buffer-string) "myecho () {
> ert-fail(((should (equal (buffer-string) "myecho () {\n echo foo\
Not reproducible here.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 14:05 ` Eli Zaretskii
@ 2024-04-04 14:32 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 15:02 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-04 14:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70196
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> Test test-basic-sh-indentation backtrace:
>> signal(ert-test-failed (((should (equal (buffer-string) "myecho () {
>> ert-fail(((should (equal (buffer-string) "myecho () {\n echo foo\
>
> Not reproducible here.
Will debug. Perhaps it is because I use tcsh as standard shell, which
isn't POSIX conform.
Best regards, Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 14:32 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-04 15:02 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 15:46 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-04 15:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70196
Michael Albinus <michael.albinus@gmx.de> writes:
Hi Eli,
>>> Test test-basic-sh-indentation backtrace:
>>> signal(ert-test-failed (((should (equal (buffer-string) "myecho () {
>>> ert-fail(((should (equal (buffer-string) "myecho () {\n echo foo\
>>
>> Not reproducible here.
>
> Will debug. Perhaps it is because I use tcsh as standard shell, which
> isn't POSIX conform.
The following works for me w/o problems:
--8<---------------cut here---------------start------------->8---
# bash -ic "make -C test sh-script-tests"
--8<---------------cut here---------------end--------------->8---
And the following shows the errors:
--8<---------------cut here---------------start------------->8---
# tcsh -ic "make -C test sh-script-tests"
--8<---------------cut here---------------end--------------->8---
So I guess one must check the used shell, when starting the tests.
Best regards, Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 15:02 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-04 15:46 ` Eli Zaretskii
2024-04-04 16:31 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-04-04 15:46 UTC (permalink / raw)
To: Michael Albinus; +Cc: 70196
> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: 70196@debbugs.gnu.org
> Date: Thu, 04 Apr 2024 17:02:22 +0200
>
> The following works for me w/o problems:
>
> --8<---------------cut here---------------start------------->8---
> # bash -ic "make -C test sh-script-tests"
> --8<---------------cut here---------------end--------------->8---
>
> And the following shows the errors:
>
> --8<---------------cut here---------------start------------->8---
> # tcsh -ic "make -C test sh-script-tests"
> --8<---------------cut here---------------end--------------->8---
>
> So I guess one must check the used shell, when starting the tests.
Thanks, does the below fix the problem?
diff --git a/test/lisp/progmodes/sh-script-tests.el b/test/lisp/progmodes/sh-script-tests.el
index e73d523..3f810e8 100644
--- a/test/lisp/progmodes/sh-script-tests.el
+++ b/test/lisp/progmodes/sh-script-tests.el
@@ -25,11 +25,15 @@
(require 'ert)
(require 'ert-x)
+(defun sh-script-tests-shell-script-mode ()
+ (sh-set-shell "/bin/sh")
+ (shell-script-mode))
+
(ert-deftest test-sh-script-indentation ()
(with-temp-buffer
(insert "relative-path/to/configure --prefix=$prefix\\
--with-x")
- (shell-script-mode)
+ (sh-script-tests-shell-script-mode)
(goto-char (point-min))
(forward-line 1)
(indent-for-tab-command)
@@ -41,7 +45,7 @@ test-sh-script-indentation
(ert-deftest test-basic-sh-indentation ()
(with-temp-buffer
(insert "myecho () {\necho foo\n}\n")
- (shell-script-mode)
+ (sh-script-tests-shell-script-mode)
(indent-region (point-min) (point-max))
(should (equal (buffer-string)
"myecho () {
@@ -55,7 +59,7 @@ test-indentation
(ert-deftest test-indent-after-continuation ()
(with-temp-buffer
(insert "for f \\\nin a; do \\\ntoto; \\\ndone\n")
- (shell-script-mode)
+ (sh-script-tests-shell-script-mode)
(let ((sh-indent-for-continuation '++))
(let ((sh-indent-after-continuation t))
(indent-region (point-min) (point-max))
@@ -72,7 +76,7 @@ test-indent-after-continuation
(defun test-sh-back (string &optional pos)
(with-temp-buffer
- (shell-script-mode)
+ (sh-script-tests-shell-script-mode)
(insert string)
(sh-smie--default-backward-token)
(= (point) (or pos 1))))
@@ -90,7 +94,7 @@ test-backward-token
(ert-deftest sh-script-test-do-fontification ()
"Test that \"do\" gets fontified correctly, even with no \";\"."
(with-temp-buffer
- (shell-script-mode)
+ (sh-script-tests-shell-script-mode)
(insert "for i do echo 1; done")
(font-lock-ensure)
(goto-char (point-min))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 15:46 ` Eli Zaretskii
@ 2024-04-04 16:31 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 18:38 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-04 16:31 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70196
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
> Thanks, does the below fix the problem?
Unfortunately not.
Best regards, Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 16:31 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-04 18:38 ` Eli Zaretskii
2024-04-05 17:49 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-04-04 18:38 UTC (permalink / raw)
To: Michael Albinus; +Cc: 70196
> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: 70196@debbugs.gnu.org
> Date: Thu, 04 Apr 2024 18:31:20 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> Hi Eli,
>
> > Thanks, does the below fix the problem?
>
> Unfortunately not.
Can you step through shell-script-mode and tell me why not? I thought
it calls sh-set-shell, but with shell it gets from the environment and
such likes, so the idea was to force it to use /bin/sh. But I
obviously missed something.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#70196: 30.0.50; sh-script-tests fails
2024-04-04 18:38 ` Eli Zaretskii
@ 2024-04-05 17:49 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 8+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-05 17:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70196-done
Version: 30.1
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
> Can you step through shell-script-mode and tell me why not? I thought
> it calls sh-set-shell, but with shell it gets from the environment and
> such likes, so the idea was to force it to use /bin/sh. But I
> obviously missed something.
I went through shell-script-mode, but honestly, the machinery is too
complex for my simple purpose, and I don't want to investigate too much
time.
So I have pushed another patch, which is more simple (checking for
sh-indent-supported-here), and which fixes the problem.
Pushed to master, and closing the bug.
Best regards, Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-04-05 17:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 13:37 bug#70196: 30.0.50; sh-script-tests fails Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 14:05 ` Eli Zaretskii
2024-04-04 14:32 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 15:02 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 15:46 ` Eli Zaretskii
2024-04-04 16:31 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-04 18:38 ` Eli Zaretskii
2024-04-05 17:49 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).