Bug #12785
closedmisc/test_ruby_mode.rb failed with emacs 25.1.1
Description
When emacs is 25.1.1, test/misc/test_ruby_mode.rb causes 8 failures.
vagrant@archlinux:~/ruby/build$ make test-all TESTS=misc/test_ruby_mode.rb
CC = ccache gcc
LD = ld
LDSHARED = ccache gcc -shared
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -std=gnu99 -fPIC
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
CPPFLAGS = -DRUBY_DEBUG_ENV -DARRAY_DEBUG -I. -I.ext/include/x86_64-linux -I../include -I.. -I../enc/unicode/9.0.0
DLDFLAGS = -Wl,-soname,libruby.so.2.4 -fstack-protector
SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
組み込み spec を使用しています。
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/lto-wrapper
ターゲット: x86_64-pc-linux-gnu
configure 設定: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
スレッドモデル: posix
gcc バージョン 6.2.1 20160830 (GCC)
Run options: "--ruby=./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems" --excludes-dir=../test/excludes --name=!/memory_leak/
# Running tests:
[1/9] TestRubyMode::TestIndent#test_array_after_paren_and_space = 0.08 s
1) Failure:
TestRubyMode::TestIndent#test_array_after_paren_and_space [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:156]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[2/9] TestRubyMode::TestIndent#test_array_literal = 0.08 s
2) Failure:
TestRubyMode::TestIndent#test_array_literal [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:123]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[3/9] TestRubyMode::TestIndent#test_begin_end = 0.08 s
3) Failure:
TestRubyMode::TestIndent#test_begin_end [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:144]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[4/9] TestRubyMode::TestIndent#test_expr_in_regexp = 0.08 s
4) Failure:
TestRubyMode::TestIndent#test_expr_in_regexp [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:98]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[5/9] TestRubyMode::TestIndent#test_keyword_label = 0.08 s
5) Failure:
TestRubyMode::TestIndent#test_keyword_label [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:72]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[6/9] TestRubyMode::TestIndent#test_method_with_question_mark = 0.08 s
6) Failure:
TestRubyMode::TestIndent#test_method_with_question_mark [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:86]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[7/9] TestRubyMode::TestIndent#test_simple = 0.08 s
7) Failure:
TestRubyMode::TestIndent#test_simple [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:58]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
[9/9] TestRubyMode::TestIndent#test_spread_arguments = 0.08 s
8) Failure:
TestRubyMode::TestIndent#test_spread_arguments [/home/vagrant/ruby/test/misc/test_ruby_mode.rb:172]:
Expected /^Wrote / to match "Indenting region...\nIndenting region...done\n".
Finished tests in 0.670478s, 13.4233 tests/s, 64.1334 assertions/s.
9 tests, 43 assertions, 8 failures, 0 errors, 1 skips
ruby -v: ruby 2.4.0dev (2016-09-22 trunk 56204) [x86_64-linux]
make: *** [uncommon.mk:623: yes-test-all] エラー 8
vagrant@archlinux:~/ruby/build$ emacs --version
GNU Emacs 25.1.1
Copyright (C) 2016 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
Does save-buffer
in Emacs 25.1 print nothing?
Or did it fail?
Updated by znz (Kazuhiro NISHIYAMA) over 8 years ago
I check with following diff, file is saved.
diff --git a/test/misc/test_ruby_mode.rb b/test/misc/test_ruby_mode.rb
index a91e1c2..36009f8 100644
--- a/test/misc/test_ruby_mode.rb
+++ b/test/misc/test_ruby_mode.rb
@@ -35,6 +35,8 @@ def run_emacs(src, *exprs)
output = IO.popen([*EMACS, tmp.path, *exprs, err:[:child, :out]], "r") {|e| e.read}
tmp.open
result = tmp.read
+ puts src
+ puts result
return result, output
ensure
tmp.close!
And I found document change of write-region
.
Emacs 25.1.1:
If VISIT is neither t nor nil nor a string, or if Emacs is in batch mode,
do not display the "Wrote file" message.
Emacs 24.5.1:
If VISIT is neither t nor nil nor a string,
that means do not display the "Wrote file" message.
And ChangeLog message: https://github.com/emacs-mirror/emacs/blob/65dc67c87553bec4c8b36432246b13f09d653118/src/ChangeLog.13#L1758-L1761
batch write-region no longer says "Wrote FOO"
This cuts down on 'make' chatter a bit.
- fileio.c (Fwrite_region):
Don't output "Wrote /whatever/foo.elc" if noninteractive.
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Status changed from Assigned to Closed
Applied in changeset r56224.
test_ruby_mode.rb: fix for Emacs 25.1
- test/misc/test_ruby_mode.rb (assert_indent): since write-region
in Emacs 25.1 no longer displays the "Wrote file" message, shows
the explicit message to check if successfully finished.
[ruby-core:77355] [Bug #12785]
Updated by nobu (Nobuyoshi Nakada) about 8 years ago
- Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
Updated by usa (Usaku NAKAMURA) about 8 years ago
- Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED
ruby_2_2 r57207 merged revision(s) 56224.
Updated by nagachika (Tomoyuki Chikanaga) almost 8 years ago
- Backport changed from 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE
ruby_2_3 r57565 merged revision(s) 56224.