emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/multiple-cursors 4a7fb32 059/434: Autotest


From: ELPA Syncer
Subject: [nongnu] elpa/multiple-cursors 4a7fb32 059/434: Autotest
Date: Sat, 7 Aug 2021 09:19:55 -0400 (EDT)

branch: elpa/multiple-cursors
commit 4a7fb327f5e1990db975a8057338c596e808d95f
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>

    Autotest
---
 run-tests.watchr | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/run-tests.watchr b/run-tests.watchr
new file mode 100644
index 0000000..c2f39c2
--- /dev/null
+++ b/run-tests.watchr
@@ -0,0 +1,45 @@
+ENV["WATCHR"] = "1"
+system 'clear'
+
+def run(cmd)
+  `#{cmd}`
+end
+
+def run_all_tests
+  system('clear')
+  result = run "./util/ecukes/ecukes"
+  puts result
+end
+
+def run_test(file)
+  system('clear')
+  result = run "./util/ecukes/ecukes #{file}"
+  puts result
+end
+
+run_all_tests
+watch('.*.feature') { |file| run_test file }
+watch('.*.el') { run_all_tests }
+
+# Ctrl-\
+Signal.trap 'QUIT' do
+  puts " --- Running all tests ---\n\n"
+  run_all_tests
+end
+
+@interrupted = false
+
+# Ctrl-C
+Signal.trap 'INT' do
+  if @interrupted then
+    @wants_to_quit = true
+    abort("\n")
+  else
+    puts "Interrupt a second time to quit"
+    @interrupted = true
+    Kernel.sleep 1.5
+    # raise Interrupt, nil # let the run loop catch it
+    run_all_tests
+    @interrupted = false
+  end
+end



reply via email to

[Prev in Thread] Current Thread [Next in Thread]