summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfeed2imap-test40
1 files changed, 40 insertions, 0 deletions
diff --git a/feed2imap-test b/feed2imap-test
new file mode 100755
index 0000000..b976bea
--- /dev/null
+++ b/feed2imap-test
@@ -0,0 +1,40 @@
+#!/usr/bin/ruby
+
+require 'fileutils'
+require 'yaml'
+
+base = File.expand_path(File.dirname(__FILE__))
+tmp = File.join(base, 'tmp')
+
+FileUtils.rm_rf(tmp)
+FileUtils.mkdir_p(tmp)
+
+# target maildir
+maildir = File.join(tmp,'Mail')
+FileUtils.mkdir_p(File.join(maildir, 'new'))
+FileUtils.mkdir_p(File.join(maildir, 'cur'))
+FileUtils.mkdir_p(File.join(maildir, 'tmp'))
+
+cache = File.join(tmp, 'cache')
+config_data = <<EOF
+cache: #{cache}
+feeds:
+ - name: CNPQ
+ url: http://www.cnpq.br/web/guest/noticias/-/asset_publisher/6QsO/rss?p_p_cacheability=cacheLevelPage
+ target: maildir://#{maildir}
+ - name: XKCD
+ url: http://www.xkcd.com/atom.xml
+ target: maildir://#{maildir}
+EOF
+config = File.join(tmp, 'feed2imap.yaml')
+File.open(config, 'w') do |f|
+ f.write(config_data)
+end
+
+system('ruby', "-I#{base}/lib", "#{base}/bin/feed2imap", '--config', config, '--verbose') || exit(1)
+
+print "Open target maildir with mutt? [Y/n]"
+response = gets.strip
+if response.downcase == 'y' || response == ''
+ exec('mutt', '-f', maildir)
+end
tions'>+11 2023-05-11Issue #95: Change cache ownership.René 'Necoro' Neumann1-0/+4 2023-05-11Issue #95: Add hint about sensible access rights.René 'Necoro' Neumann1-0/+1 2023-04-23[workflow] Port changes also to releaseRené 'Necoro' Neumann1-6/+5 2023-04-23[workflow] Checkout before go setupRené 'Necoro' Neumann1-3/+3 2023-04-23[workflow] determine go version from go.modRené 'Necoro' Neumann1-3/+2 2023-04-23Improve test to also validate error messageRené 'Necoro' Neumann1-42/+39 2023-04-22Fix/improve testsRené 'Necoro' Neumann1-59/+104 2023-04-22Improve error handlingRené 'Necoro' Neumann1-1/+11 2023-04-21Fix workflow: '1.20' needs to be quotedRené 'Necoro' Neumann2-2/+2