Subject: bug#39075: 28.0.50; Emacs hangs on 100% CPU and grows beyond bounds in shell-mode

From: Glenn Morris <[email-masked]>
Date: Sun, 19 Jan 2020 13:08:43 -0500

This causes a test failure for me on CentOS 8.1.
(BTW, the bug# in the commit log has a typo, but obviosuly nothing can
be done about that.)

Test shell-tests-completion-before-semi backtrace:
  signal(ert-test-failed (((should (equal (shell--parse-pcomplete-argu
  ert-fail(((should (equal (shell--parse-pcomplete-arguments) '(("cd" 
  #f(compiled-function () #<bytecode 0x45cfa9>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name shell-tests-completion-before-semi :d
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or (tag :expensi
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/shell-tests" "--eval
  command-line()
  normal-top-level()
Test shell-tests-completion-before-semi condition:
    (ert-test-failed
     ((should
       (equal
	(shell--parse-pcomplete-arguments)
	'...))
      :form
      (equal
       (("cd" "ba" "")
	1 4 7)
       (("cd" "ba" "")
	1 4))
      :value nil :explanation
      (proper-lists-of-different-length 4 3
					(("cd" "ba" "")
					 1 4 7)
					(("cd" "ba" "")
					 1 4)
					first-mismatch-at 3)))
   FAILED  1/2  shell-tests-completion-before-semi (0.000774 sec)