user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
c927e1a71a5c91c7cd671884bb1d55bb039cfbce blob 1309 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
#!perl -w
# Copyright (C) 2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use PublicInbox::TestCommon;
require_ok 'PublicInbox::MdirReader';
*maildir_basename_flags = \&PublicInbox::MdirReader::maildir_basename_flags;
*maildir_path_flags = \&PublicInbox::MdirReader::maildir_path_flags;

is(maildir_basename_flags('foo'), '', 'new valid name accepted');
is(maildir_basename_flags('foo:2,'), '', 'cur valid name accepted');
is(maildir_basename_flags('foo:2,bar'), 'bar', 'flags name accepted');
is(maildir_basename_flags('.foo:2,bar'), undef, 'no hidden files');
is(maildir_basename_flags('fo:o:2,bar'), undef, 'no extra colon');
is(maildir_path_flags('/path/to/foo:2,S'), 'S', 'flag returned for path');
is(maildir_path_flags('/path/to/.foo:2,S'), undef, 'no hidden paths');
is(maildir_path_flags('/path/to/foo:2,'), '', 'no flags in path');

# not sure if there's a better place for eml_from_path
use_ok 'PublicInbox::InboxWritable', qw(eml_from_path);
is(eml_from_path('.'), undef, 'eml_from_path fails on directory');

is_deeply([PublicInbox::MdirReader::flags2kw('S')], [{ 'seen' => 1 }, []],
	"`seen' kw set from flag");
is_deeply([PublicInbox::MdirReader::flags2kw('Su')], [{ 'seen' => 1 }, ['u']],
	'unknown flag ignored');

done_testing;
debug log:

solving c927e1a7 ...
found c927e1a7 in public-inbox.git

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.mail.public-inbox.meta
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.mail.public-inbox.meta
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git