From ab4ebdf1751158391100efb0002f40b1d7f6314c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 30 Jul 2018 15:05:41 -0700 Subject: Changed autoformatting rules to ensure tests get clumped together with the thing below them. --- lib/file_hash.nom | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/file_hash.nom') diff --git a/lib/file_hash.nom b/lib/file_hash.nom index aef1c78..2f9076e 100644 --- a/lib/file_hash.nom +++ b/lib/file_hash.nom @@ -9,7 +9,6 @@ use "lib/base64.nom" test: assume ((hash "hello world") == "Kq5sNclPz7QV2+lfQIuc6R7oRu0=") - action [hash %, sha1 %]: %hash = (=lua "\%hashlib.new('sha1'):final(\%)") return (base64 %hash) @@ -18,7 +17,6 @@ action [file with hash %hash]: for file %filename in ".": %contents = (read file %filename) %file_hash = (hash %contents) - if (%file_hash == %hash): - return %filename + if (%file_hash == %hash): return %filename parse [hash of file %filename] as (sha1 (read file %filename)) -- cgit v1.2.3