user/dev discussion of public-inbox itself
 help / color / Atom feed
* [PATCH 0/2] tiny fixes to comments
@ 2020-04-07 21:55 Eric Wong
  2020-04-07 21:55 ` [PATCH 1/2] tests: document run_mode=1 as not implemented Eric Wong
  2020-04-07 21:55 ` [PATCH 2/2] triewyde: ficks soem speling errrors Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2020-04-07 21:55 UTC (permalink / raw)
  To: meta

I think all the documentation for users is free of errors,
so start ficksing r comments so other hackers don't think
were ulliter8.

Eric Wong (2):
  tests: document run_mode=1 as not implemented
  triewyde: ficks soem speling errrors

 lib/PublicInbox/DS.pm           | 2 +-
 lib/PublicInbox/Hval.pm         | 2 +-
 lib/PublicInbox/MsgTime.pm      | 2 +-
 lib/PublicInbox/SearchIdx.pm    | 2 +-
 lib/PublicInbox/SearchThread.pm | 2 +-
 lib/PublicInbox/TestCommon.pm   | 6 +++---
 lib/PublicInbox/View.pm         | 2 +-
 t/data/0001.patch               | 2 +-
 t/httpd-corner.t                | 2 +-
 t/mda.t                         | 2 +-
 t/nntpd.t                       | 2 +-
 t/run.perl                      | 2 +-
 t/search.t                      | 2 +-
 13 files changed, 15 insertions(+), 15 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] tests: document run_mode=1 as not implemented
  2020-04-07 21:55 [PATCH 0/2] tiny fixes to comments Eric Wong
@ 2020-04-07 21:55 ` Eric Wong
  2020-04-07 21:55 ` [PATCH 2/2] triewyde: ficks soem speling errrors Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2020-04-07 21:55 UTC (permalink / raw)
  To: meta

It was implemented at some point, but it was more things to
support and the worst of both worlds: both unrealistic compared
to real-world use and slower than run_mode=2.

Noticed while looking for speling erorrs.
---
 lib/PublicInbox/TestCommon.pm | 6 +++---
 t/nntpd.t                     | 2 +-
 t/run.perl                    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index 386610ff..6e3e9d8c 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -119,11 +119,11 @@ sub _undo_redirects ($) {
 	}
 }
 
-# $opt->{run_mode} (or $ENV{TEST_RUN_MODE}) allows chosing between
+# $opt->{run_mode} (or $ENV{TEST_RUN_MODE}) allows choosing between
 # three ways to spawn our own short-lived Perl scripts for testing:
 #
 # 0 - (fork|vfork) + execve, the most realistic but slowest
-# 1 - preloading and running in a forked subprocess (fast)
+# 1 - (not currently implemented)
 # 2 - preloading and running in current process (slightly faster than 1)
 #
 # 2 is not compatible with scripts which use "exit" (which we'll try to
@@ -247,7 +247,7 @@ sub wait_for_tail () { sleep(2) }
 sub start_script {
 	my ($cmd, $env, $opt) = @_;
 	my ($key, @argv) = @$cmd;
-	my $run_mode = $ENV{TEST_RUN_MODE} // $opt->{run_mode} // 1;
+	my $run_mode = $ENV{TEST_RUN_MODE} // $opt->{run_mode} // 2;
 	my $sub = $run_mode == 0 ? undef : key2sub($key);
 	my $tail_pid;
 	if (my $tail_cmd = $ENV{TAIL}) {
diff --git a/t/nntpd.t b/t/nntpd.t
index 89085049..43b14d66 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -301,7 +301,7 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
 		is($? >> 8, 0, 'no errors');
 	}
 	SKIP: {
-		if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//1)) {
+		if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//2)) {
 			skip 'Search/Xapian.pm pre-loaded (by t/run.perl?)', 1;
 		}
 		my @of = `lsof -p $td->{pid} 2>/dev/null`;
diff --git a/t/run.perl b/t/run.perl
index 3e6801f2..017ca3e8 100755
--- a/t/run.perl
+++ b/t/run.perl
@@ -26,7 +26,7 @@ GetOptions('j|jobs=i' => \$jobs,
 	'log=s' => \$log_suffix,
 	's|shuffle' => \$shuffle,
 ) or die "Usage: $0 [-j JOBS] [--log=SUFFIX] [--repeat RUNS]";
-if (($ENV{TEST_RUN_MODE} // 1) == 0) {
+if (($ENV{TEST_RUN_MODE} // 2) == 0) {
 	die "$0 is not compatible with TEST_RUN_MODE=0\n";
 }
 my @tests = scalar(@ARGV) ? @ARGV : glob('t/*.t');

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] triewyde: ficks soem speling errrors
  2020-04-07 21:55 [PATCH 0/2] tiny fixes to comments Eric Wong
  2020-04-07 21:55 ` [PATCH 1/2] tests: document run_mode=1 as not implemented Eric Wong
@ 2020-04-07 21:55 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2020-04-07 21:55 UTC (permalink / raw)
  To: meta

Dikshunarees R gude!
---
 lib/PublicInbox/DS.pm           | 2 +-
 lib/PublicInbox/Hval.pm         | 2 +-
 lib/PublicInbox/MsgTime.pm      | 2 +-
 lib/PublicInbox/SearchIdx.pm    | 2 +-
 lib/PublicInbox/SearchThread.pm | 2 +-
 lib/PublicInbox/View.pm         | 2 +-
 t/data/0001.patch               | 2 +-
 t/httpd-corner.t                | 2 +-
 t/mda.t                         | 2 +-
 t/search.t                      | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index 4d685131..01c8917e 100644
--- a/lib/PublicInbox/DS.pm
+++ b/lib/PublicInbox/DS.pm
@@ -615,7 +615,7 @@ sub shutdn_tls_step ($) {
 }
 
 # don't bother with shutdown($sock, 2), we don't fork+exec w/o CLOEXEC
-# or fork w/o exec, so no inadvertant socket sharing
+# or fork w/o exec, so no inadvertent socket sharing
 sub shutdn ($) {
     my ($self) = @_;
     my $sock = $self->{sock} or return;
diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm
index 23233f0e..46a83916 100644
--- a/lib/PublicInbox/Hval.pm
+++ b/lib/PublicInbox/Hval.pm
@@ -80,7 +80,7 @@ sub obfuscate_addrs ($$;$) {
 	my $ibx = $_[0];
 	my $repl = $_[2] // '•';
 	my $re = $ibx->{-no_obfuscate_re}; # regex of domains
-	my $addrs = $ibx->{-no_obfuscate}; # { adddress => 1 }
+	my $addrs = $ibx->{-no_obfuscate}; # { $address => 1 }
 	$_[1] =~ s/(([\w\.\+=\-]+)\@([\w\-]+\.[\w\.\-]+))/
 		my ($addr, $user, $domain) = ($1, $2, $3);
 		if ($addrs->{$addr} || ((defined $re && $domain =~ $re))) {
diff --git a/lib/PublicInbox/MsgTime.pm b/lib/PublicInbox/MsgTime.pm
index bd7ef811..920e8f8a 100644
--- a/lib/PublicInbox/MsgTime.pm
+++ b/lib/PublicInbox/MsgTime.pm
@@ -95,7 +95,7 @@ sub str2date_zone ($) {
 		$sign = '+' if $off == 0;
 		$zone = sprintf('%s%02d%02d', $sign, $tz_hh, $tz_mm);
 
-	# Time::Zone and Date::Parse are part of the same distibution,
+	# Time::Zone and Date::Parse are part of the same distribution,
 	# and we need Time::Zone to deal with tz names like "EDT"
 	} elsif (eval { require Date::Parse }) {
 		$ts = Date::Parse::str2time($date);
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 9a5484e3..05689941 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -634,7 +634,7 @@ sub _git_log {
 	my $git = $self->{git};
 
 	if (index($range, '..') < 0) {
-		# don't show annoying git errrors to users who run -index
+		# don't show annoying git errors to users who run -index
 		# on empty inboxes
 		$git->qx(qw(rev-parse -q --verify), "$range^0");
 		if ($?) {
diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm
index 8b2cb805..38d1aa6e 100644
--- a/lib/PublicInbox/SearchThread.pm
+++ b/lib/PublicInbox/SearchThread.pm
@@ -29,7 +29,7 @@ sub thread {
 	# Sadly, we sort here anyways since the fill-in-the-blanks References:
 	# can be shakier if somebody used In-Reply-To with multiple, disparate
 	# messages.  So, take the client Date: into account since we can't
-	# alway determine ordering when somebody uses multiple In-Reply-To.
+	# always determine ordering when somebody uses multiple In-Reply-To.
 	# We'll trust the client Date: header here instead of the Received:
 	# time since this is for display (and not retrieval)
 	_add_message($id_table, $_) for sort { $a->{ds} <=> $b->{ds} } @$msgs;
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 33b323dc..b6d7acaf 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -150,7 +150,7 @@ sub in_reply_to {
 sub fold_addresses ($) {
 	return $_[0] if length($_[0]) <= COLS;
 	# try to fold on commas after non-word chars before $lim chars,
-	# Try to get the "," preceeded by ">" or ")", but avoid folding
+	# Try to get the "," preceded by ">" or ")", but avoid folding
 	# on the comma where somebody uses "Lastname, Firstname".
 	# We also try to keep the last and penultimate addresses in
 	# the list on the same line if possible, hence the extra \z
diff --git a/t/data/0001.patch b/t/data/0001.patch
index b7964a2b..4d0e52fc 100644
--- a/t/data/0001.patch
+++ b/t/data/0001.patch
@@ -12,7 +12,7 @@ still allows probabilistic searches on everything that's in a
 "git diff", including the blob names which were just made
 boolean.
 
-Note, attachment filenames ("n:" prefix) will stil use
+Note, attachment filenames ("n:" prefix) will still use
 probabilistic search, as they're hardly standardized.
 ---
  lib/PublicInbox/Search.pm | 6 +++---
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index cbfc8332..89f2866b 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -544,7 +544,7 @@ SKIP: {
 }
 
 {
-	my $conn = conn_for($sock, '1.1 Connnection: close');
+	my $conn = conn_for($sock, '1.1 Connection: close');
 	$conn->write("PUT /sha1 HTTP/1.1\r\nConnection:close\r\n");
 	delay();
 	$conn->write("Content-Length: $len\r\n\r\n$str");
diff --git a/t/mda.t b/t/mda.t
index 3bdccb49..ddc0c279 100644
--- a/t/mda.t
+++ b/t/mda.t
@@ -34,7 +34,7 @@ my $fail_bad_header = sub ($$$) {
 		"no error on undeliverable ($msg)");
 	my $rev = $git->qx(qw(rev-list HEAD));
 	chomp $rev;
-	is($rev, $good_rev, "bad revision not commited ($msg)");
+	is($rev, $good_rev, "bad revision not committed ($msg)");
 	@f = glob("$faildir/*/*");
 	is(scalar @f, 1, "faildir written to");
 	[ $in, $out, $err ];
diff --git a/t/search.t b/t/search.t
index 3213ac2a..839a320a 100644
--- a/t/search.t
+++ b/t/search.t
@@ -229,7 +229,7 @@ $ibx->with_umask(sub {
 	$rw_commit->();
 	$ro->reopen;
 	my $t = $ro->{over_ro}->get_thread('root@s');
-	is(scalar(@$t), 4, "got all 4 mesages in thread");
+	is(scalar(@$t), 4, "got all 4 messages in thread");
 	my @exp = sort($long_reply_mid, 'root@s', 'last@s', $long_mid);
 	@res = filter_mids($t);
 	is_deeply(\@res, \@exp, "get_thread works");

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 21:55 [PATCH 0/2] tiny fixes to comments Eric Wong
2020-04-07 21:55 ` [PATCH 1/2] tests: document run_mode=1 as not implemented Eric Wong
2020-04-07 21:55 ` [PATCH 2/2] triewyde: ficks soem speling errrors Eric Wong

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror http://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

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.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/

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