1. 21 Feb, 2019 1 commit
    • Michael R. Mauger's avatar
      Correct implementation of `sql-set-product-feature' (Bug#30494). · c124d532
      Michael R. Mauger authored
      * lisp.progmodes/sql.el (sql-add-product): Correct argument spec.
      (sql-set-product-feature): Handle all cases as intended.
      (sql-get-product-feature): Fetch varaiable value by `eval'.
      * test/lisp/progmodes/sql-tests.el (sql-test-feature-value-[a-d]):
      New test variables.
      (sql-test-product-feature-harness): New test macro.
      (sql-test-add-product, sql-test-add-existing-product)
      (sql-test-set-feature, sql-test-set-indirect-feature)
      (sql-test-set-existing-feature)
      (sql-test-set-existing-indirect-feature)
      (sql-test-set-missing-product, sql-test-get-feature)
      (sql-test-get-indirect-feature, sql-test-get-missing-product)
      (sql-test-get-missing-feature)
      (sql-test-get-missing-indirect-feature): New ERT tests
      c124d532
  2. 19 Feb, 2019 2 commits
    • Michael Albinus's avatar
      Implement access-file in Tramp · 0a6c4479
      Michael Albinus authored
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist)
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      Add `access-file'.
      
      * lisp/net/tramp-archive.el (tramp-archive-handle-access-file):
      * lisp/net/tramp.el (tramp-handle-access-file): New defun.
      (tramp-condition-case-unless-debug): Add declaration.
      (tramp-handle-insert-directory):
      * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
      * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
      Check, whether directory is accessible.
      
      * test/lisp/net/tramp-archive-tests.el
      (tramp-archive-test17-insert-directory)
      (tramp-archive-test18-file-attributes):
      * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
      (tramp-test18-file-attributes): Test error cases.
      0a6c4479
    • Michael R. Mauger's avatar
      * lisp/progmodes/sql.el: Added password wallet using · 1a6bcc91
      Michael R. Mauger authored
      `auth-source' package.
      (sql-auth-source-search-wallet): New function.
      (sql-password-wallet): New variable.
      (sql-password-search-wallet-function): New variable.
      (sql-get-login): Handle password wallet search.
      (sql-product-interactive): Handle password function.
      * test/lisp/progmodes/sql-test.el: Test wallet changes.
      (sql-test-login-params): New test variable.
      (with-sql-test-connect-harness): New macro to wrap test
      configuration around calls to `sql-connect'.
      (sql-test-connect, sql-test-connect-password-func)
      (sql-test-connect-wallet-server-database)
      (sql-test-connect-wallet-database)
      (sql-test-connect-wallet-server): New ERT tests.
      * etc/NEWS: Updated SQL Mode descriptions.
      1a6bcc91
  3. 18 Feb, 2019 1 commit
  4. 16 Feb, 2019 1 commit
    • Mattias Engdegård's avatar
      Prevent over-eager rx character range condensation · 478bbf7c
      Mattias Engdegård authored
      `rx' incorrectly considers character ranges between ASCII and raw bytes to
      cover all codes in-between, which includes all non-ASCII Unicode chars.
      This causes (any "\000-\377" ?Å) to be simplified to (any "\000-\377"),
      which is not at all the same thing: [\000-\377] really means
      [\000-\177\200-\377] (Bug#34492).
      
      * lisp/emacs-lisp/rx.el (rx-any-condense-range): Split ranges going
      from ASCII to raw bytes.
      * test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte): Add test case.
      * etc/NEWS: Mention the overall change (Bug#33205).
      478bbf7c
  5. 15 Feb, 2019 2 commits
  6. 10 Feb, 2019 1 commit
  7. 05 Feb, 2019 1 commit
    • Robert Pluim's avatar
      Fix network stream tests · d087dcf1
      Robert Pluim authored
      * test/lisp/net/network-stream-tests.el
      (make-ipv6-tcp-server-with-unspecified-port): Skip if IPv6 is not available.
      (make-ipv6-tcp-server-with-specified-port): Likewise.
      (echo-server-with-local-ipv6): Likewise.
      d087dcf1
  8. 04 Feb, 2019 1 commit
    • Robert Pluim's avatar
      Use IPv6 localhost when family is 'ipv6 · 49f62430
      Robert Pluim authored
      This fixes Bug#34193
      
      * src/process.c (Fmake_network_process): Explicitly use ::1 when
      using IPv6 with 'local.  Update docstring.
      
      * test/lisp/net/network-stream-tests.el
      (make-ipv6-tcp-server-with-unspecified-port):
      (make-ipv6-tcp-server-with-specified-port): Test creating ipv6
      local server.
      (make-server): Add optional family argument, default ipv4
      (echo-server-with-local-ipv4): Test connecting to 'local ipv4
      (echo-server-with-local-ipv6): Test connecting to 'local ipv6
      
      * doc/lispref/processes.texi (Network Processes): Describe
      behavior when using 'local.
      
      * etc/NEWS: Document new 'make-network-process' behavior when
      connecting to 'local with ipv6.
      49f62430
  9. 03 Feb, 2019 2 commits
    • Juri Linkov's avatar
      * lisp/tar-mode.el (tar-extract): Call tar--try-jka-compr (bug#34251) · 4633b0ef
      Juri Linkov authored
      * lisp/tar-mode.el (tar--try-jka-compr): New function copied from
      archive-try-jka-compr.
      
      * lisp/arc-mode.el (archive-try-jka-compr): Set buffer-multibyte to t
      instead of let-binding coding-system-for-read to 'no-conversion.
      
      * test/data/decompress/tg.tar.gz:
      * test/data/decompress/zg.zip: New fixtures.
      
      * test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-gz):
      * test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-gz): New tests.
      
      * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
      (diff-mode-test-font-lock-syntax-one-line): Skip unless shell and
      diff executables are found.
      4633b0ef
    • Michael Albinus's avatar
      Work on accept-process-output in Tramp · b32ac17c
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-accept-process-output): Rework timer
      handling.
      (tramp-call-process): Adapt VEC if nil.
      (tramp-interrupt-process): Use `tramp-accept-process-output'.
      (tramp-process-lines): New defun.
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names): Use it.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
      Use timeout 0 in `tramp-accept-process-output'.
      
      * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Move up.
      (tramp-test29-start-file-process, tramp-test30-make-process)
      (tramp-test32-shell-command)
      (tramp--test-shell-command-to-string-asynchronously): Use it.
      (tramp-test35-remote-path): Suppress warning.
      (tramp--test-asynchronous-requests-timeout): New defconst.
      (tramp-test43-asynchronous-requests): Skip if not the only test.
      Use `tramp--test-asynchronous-requests-timeout'.
      Remove instrumentation.  Use `start-process-shell-command' for
      watchdog.  Add timeout in timer function.  Print status messages.
      Remove file operations from sentinel.  Suppress timers in
      `accept-process-output'.
      b32ac17c
  10. 02 Feb, 2019 1 commit
    • Juri Linkov's avatar
      * test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock): New test. · 42c83990
      Juri Linkov authored
      (diff-mode-test-font-lock-syntax-one-line): New test for one line.
      
      * test/data/vc/diff-mode/hello_world.c:
      * test/data/vc/diff-mode/hello_world_1.c:
      * test/data/vc/diff-mode/hello_emacs.c:
      * test/data/vc/diff-mode/hello_emacs_1.c: New fixtures.
      
      * lisp/vc/diff-mode.el (diff-syntax-fontify): Move remove-overlays
      from diff-syntax-fontify-hunk.  (Bug#33567)
      (diff-syntax-fontify-hunk): Remove VISIT arg from insert-file-contents.
      42c83990
  11. 01 Feb, 2019 1 commit
  12. 30 Jan, 2019 3 commits
  13. 29 Jan, 2019 2 commits
  14. 28 Jan, 2019 2 commits
  15. 24 Jan, 2019 2 commits
    • Michael Albinus's avatar
      ; Remove tramp-tests instrumentation · 24f11003
      Michael Albinus authored
      24f11003
    • Robert Pluim's avatar
      Check for client certificates when using GnuTLS · f3f9a358
      Robert Pluim authored
      This fixes Bug#33780, and extends the documentation to describe how to
      enable use of client certificates.
      
      * lisp/net/network-stream.el (network-stream-certificate): Correct
      order of parameters to plist-get.
      (network-stream-open-tls): Pass all received parameters to
      open-gnutls-stream as plist, not just :nowait.
      
      * lisp/net/gnutls.el (open-gnutls-stream): Change optional nowait arg
      to be plist.  Derive nowait and client certificate(s) and keys(s) from
      plist (maybe via auth-source) and pass to gnutls-boot-parameters and
      gnutls-negotiate.
      (network-stream-certificate): Add declare-function form for it.
      
      * doc/misc/auth.texi (Help for users): Describe format to use for
      client key/cert specification.
      
      * doc/misc/emacs-gnutls.texi (Help For Developers): Describe usage of
      optional plist argument.  Add crossreference to description of
      .authinfo format for client key/cert specification.
      
      * etc/NEWS: Describe new client certificate functionality for
        'open-network-stream'.
      
      * test/lisp/net/network-stream-tests.el: Add require of network-stream.
      (connect-to-tls-ipv4-nowait): Bind network-security-level to 'low
      in order to bypass nsm prompting.
      (connect-to-tls-ipv6-nowait): Likewise.
      (open-network-stream-tls-wait): New test.
      (open-network-stream-tls-nowait): New test.
      (open-network-stream-tls): New test.
      (open-network-stream-tls-nocert): New test.
      (open-gnutls-stream-new-api-default): New test.
      (open-gnutls-stream-new-api-wait): New test.
      (open-gnutls-stream-old-api-wait): New test.
      (open-gnutls-stream-new-api-nowait): New test.
      (open-gnutls-stream-old-api-nowait): New test.
      (open-gnutls-stream-new-api-errors): New test.
      The new tests exercise 'open-network-stream' and the old and new
      api of 'open-gnutls-stream'.
      f3f9a358
  16. 23 Jan, 2019 4 commits
  17. 22 Jan, 2019 5 commits
    • Michael Albinus's avatar
      ; Instrument tramp-tests · ec9f42bc
      Michael Albinus authored
      ec9f42bc
    • João Távora's avatar
      electric-layout-mode kicks in before electric-pair-mode · fd943124
      João Távora authored
      This aims to solve problems with indentation.  Previously in, say, a
      js-mode buffer with electric-layout-rules set to
      
         (?\{ before after)
         (?\} before)
      
      would produce an intended:
      
         function ()
         {
           <indented point>
         }
      
      The initial state
      
        function () {
      
      Would go immediately to the following by e-p-m
      
        function () {}
      
      Only then would e-l-m be applied to } first, and then again to {.
      This makes lines indent in the wrong order, which can be a problem in
      some modes.
      
      The way we fix this is by reversing the order of e-p-m and e-l-m in
      the post-self-insert-hook (and also fixing a number of details that
      this uncovered).  In the end this changes the sequence from
      
        function () {
      
      By way of e-l-m becomes:
      
        function () <newline>
        {
        <newline>
      
      The e-p-m inserts the pair
      
        function () <newline>
        {
        <newline>}
      
      And then e-l-m kicks in for the pair again, yielding the desired result
      
        function () <newline>
        {
        <indented point>
        }
      
      * lisp/elec-pair.el (electric-pair--insert): Bind
      electric-layout-no-duplicate-newlines.
      (electric-pair-inhibit-if-helps-balance)
      (electric-pair-skip-if-helps-balance): Use insert-before-markers,
      playing nice with save-excurion.
      (electric-pair-post-self-insert-function): Go to correct position
      before checking electric-pair-inhibit-predicate and
      electric-pair-skip-self predicate.
      (electric-pair-post-self-insert-function): Increase priority to
      50.
      
      * lisp/electric.el (electric-indent-post-self-insert-function):
      Delete trailing space in reindented line only if line was
      really reindented.  Rewrite comment.
      (electric-layout-allow-duplicate-newlines): New variable.
      (electric-layout-post-self-insert-function-1): Rewrite comments.
      Honours electric-layout-allow-duplicate-newlines.  Don't reindent
      previous line because racecar.
      
      * test/lisp/electric-tests.el: New test.
      (plainer-c-mode): Move up.
      (electric-modes-int-main-allman-style)
      (electric-layout-int-main-kernel-style): Simplify
      electric-layout-rules.
      (electric-layout-for-c-style-du-jour): New helper.
      (electric-layout-plainer-c-mode-use-c-style): New test.
      fd943124
    • João Távora's avatar
      Remove tests of electric-pair-mode and CC-based modes · 6ca4626c
      João Távora authored
      The behaviour previously observed in cc-mode-based-modes (and every
      other major-mode) when electric-pair-mode or electric-layout-mode is
      turned on may no longer be observed: this because CC-mode goes around
      the generic implementation of electric-pair-mode.
      
      An alternative is to bind every delimiter key like '{', '}', etc to
      'self-insert-command, like most major modes already do, at the cost of
      losing c-auto-newline functionality (which was incompatible anyway
      before the recent changes of bug#33794).
      
      * test/lisp/electric-tests.el
      (electric-pair-test-for): No longer set it.
      (define-electric-pair-test): Use js-mode instead of c++ mode,
      which broke recently.
      (whitespace-chomping-2): Add failing C++ test explicitly.
      (electric-layout-int-main-kernel-style): Use plainer-c-mode.
      (electric-layout-int-main-allman-style): Deleted.
      (electric-modes-int-main-allman-style): Renamed from
      electric-layout-int-main-allman-style.
      6ca4626c
    • Alan Mackenzie's avatar
      f97b734f
    • Michael Albinus's avatar
      Make Tramp tests more robust · 6038fdb2
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
      Bind `tramp-default-method'.
      (tramp--test-file-attributes-equal-p): New defsubst.
      (tramp-test19-directory-files-and-attributes): Use it.
      6038fdb2
  18. 17 Jan, 2019 3 commits
    • João Távora's avatar
      Fix electric-pair-tests by disabling bug#33794's fix with a variable · be505726
      João Távora authored
      The variable c--disable-fix-of-bug-33794, which should be removed in
      the short term in favor of a permanent solution, is introduced.
      
      It is bound to nil by default.  This means that breakage is still
      happening in actual c-mode and c++-mode usage, though the tests no
      longer show it.
      
      To get around this breakage, put
      
         (setq c--disable-fix-of-bug-33794 t)
      
      In your init file.  Evidently, you will lose the fix for bug#33794,
      but that only affects a small corner case of c-toggle-auto-newline,
      which is not turned on by default.
      
      See https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00360.html
      for more information.
      
      * lisp/progmodes/cc-cmds.el (c--disable-fix-of-bug-33794): New
      variable.
      (c--with-post-self-insert-hook-maybe): New macro.
      (c-electric-pound, c-electric-brace, c-electric-slash)
      (c-electric-star, c-electric-semi&comma, c-electric-colon)
      (c-electric-lt-gt, c-electric-paren): Use it.
      (c-electric-paren, c-electric-brace): Check
      c--disable-fix-of-bug-33794.
      
      * test/lisp/electric-tests.el (c--disable-fix-of-bug-33794):
      Forward declare.
      (electric-pair-test-for)
      (electric-layout-int-main-kernel-style)
      (electric-modes-in-c-mode-with-self-insert-command): Use it.
      be505726
    • João Távora's avatar
      Revert "Temporarily comment out CC Mode from tests..." · 4bdc0374
      João Távora authored
      This reverts commit 54f29790.
      4bdc0374
    • Alan Mackenzie's avatar
      Temporarily comment out CC Mode from tests which are incompatible with it. · 54f29790
      Alan Mackenzie authored
      * tests/electric-tests (electric-pair-test-for): comment out c++-mode from the
      list of modes to be used in tests.
      (electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings)
      (ert-deftest electric-layout-int-main-kernel-style)
      (ert-deftest electric-layout-int-main-allman-style): Comment out.
      54f29790
  19. 16 Jan, 2019 1 commit
    • Michael Albinus's avatar
      Some accept-process-output cleanups in Tramp · b2497ef6
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-action-out-of-band): Read process
      output in a loop.
      (tramp-accept-process-output): Return result.
      (tramp-interrupt-process):
      * lisp/net/tramp-adb.el (tramp-adb-parse-device-names):
      * lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names):
      Remove FIXME.
      
      * lisp/net/tramp-sh.el (tramp-local-coding-commands): Fix docstring.
      
      * lisp/net/tramp-smb.el (tramp-smb-wait-for-output): Adapt docstring.
      Simplify code.
      
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
      Adapt docstring.  Read process output in a loop.
      
      * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
      Remove :unstable tag on emba.
      b2497ef6
  20. 10 Jan, 2019 1 commit
    • Michael Albinus's avatar
      New test custom--test-theme-variables · 7ae0a24c
      Michael Albinus authored
      * test/lisp/custom-tests.el (custom--test-user-option)
      (custom--test-variable): New variables.
      (custom--test-theme-variables): New test.
      
      * test/lisp/custom-resources/custom--test-theme.el (custom--test):
      New file.
      7ae0a24c
  21. 07 Jan, 2019 3 commits
    • Michael Albinus's avatar
      Adapt filenotify-tests for emba · 13b586d7
      Michael Albinus authored
      * .gitlab-ci.yml (test): Add EMACS_EMBA_CI variable.
      
      * test/lisp/filenotify-tests.el (file-notify-test03-events)
      (file-notify-test05-file-validity)
      (file-notify-test06-dir-validity)
      (file-notify-test07-many-events)
      (file-notify-test09-watched-file-in-watched-dir): Adapt tests for emba.
      13b586d7
    • Michael Albinus's avatar
      ; Format filenotify-tests.el · b513feb8
      Michael Albinus authored
      b513feb8
    • Michael Albinus's avatar
      Adapt tests for emba · 536e6dea
      Michael Albinus authored
      * test/lisp/filenotify-tests.el (file-notify-test03-events)
      (file-notify-test05-file-validity)
      (file-notify-test06-dir-validity)
      (file-notify-test07-many-events)
      (file-notify-test09-watched-file-in-watched-dir): Adapt tests for emba.
      536e6dea