Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
wording: finish fixing wording and associated tests
Baptiste Daroussin committed 1 month ago
commit 05a6aa3768f35e5c2aef60e93051f854470d19ee
parent a159fe4
4 files changed +17 -17
modified libpkg/fetch_file.c
@@ -62,13 +62,13 @@ file_open(struct pkg_repo *repo, struct fetch_item *fi)
		char fqdn[256]="";
		char *path = strchr(u+1, '/');
		if (path == NULL) {
-
			pkg_emit_error("Invalid url: '%s',\n"
+
			pkg_emit_error("Invalid URL: '%s',\n"
					"file:///<path> or file://localhost/<path> expected.", fi->url);
			return (EPKG_FATAL);
		}
		strncat(fqdn, u, MIN(255, path-u));
		if (0 != strncmp("localhost", fqdn, sizeof(fqdn))) {
-
			pkg_emit_error("Invalid url: '%s'\n"
+
			pkg_emit_error("Invalid URL: '%s'\n"
					"file:///<path> or file://localhost/<path> expected.", fi->url);
			return (EPKG_FATAL);
			}
modified libpkg/fetch_ssh.c
@@ -267,7 +267,7 @@ pkgprotocol_open(struct pkg_repo *repo, struct fetch_item *fi,

	if (yuarel_parse(&url, url_to_free) == -1) {
		free(url_to_free);
-
		pkg_emit_error("Invalid url: '%s'", fi->url);
+
		pkg_emit_error("Invalid URL: '%s'", fi->url);
		return (EPKG_FATAL);
	}

modified tests/frontend/create.sh
@@ -297,7 +297,7 @@ EOS
EOF
	atf_check \
		-o empty \
-
		-e inline:"meh\n${PROGNAME}: Fail to apply keyword 'test'\n" \
+
		-e inline:"meh\n${PROGNAME}: Failed to apply keyword 'test'\n" \
		-s exit:1 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .

@@ -311,7 +311,7 @@ EOS
EOF
	atf_check \
		-o inline:"file1\n" \
-
		-e inline:"meh\n${PROGNAME}: Fail to apply keyword 'test'\n" \
+
		-e inline:"meh\n${PROGNAME}: Failed to apply keyword 'test'\n" \
		-s exit:1 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .

@@ -325,7 +325,7 @@ EOS
EOF
	atf_check \
		-o inline:"0\n" \
-
		-e inline:"meh\n${PROGNAME}: Fail to apply keyword 'test'\n" \
+
		-e inline:"meh\n${PROGNAME}: Failed to apply keyword 'test'\n" \
		-s exit:1 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .

@@ -340,7 +340,7 @@ EOS
EOF
	atf_check \
		-o inline:"1\n" \
-
		-e inline:"meh\n${PROGNAME}: Fail to apply keyword 'test'\n" \
+
		-e inline:"meh\n${PROGNAME}: Failed to apply keyword 'test'\n" \
		-s exit:1 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .

@@ -365,11 +365,11 @@ io.stderr:write("Invalid number of arguments '".. #arg .. "' expecting 1 or 2\n"
return 1
EOS
EOF
-
output="${PROGNAME}: Fail to apply keyword 'test'
+
output="${PROGNAME}: Failed to apply keyword 'test'
The first and the second argument are identical
-
${PROGNAME}: Fail to apply keyword 'test'
+
${PROGNAME}: Failed to apply keyword 'test'
Invalid number of arguments '3' expecting 1 or 2
-
${PROGNAME}: Fail to apply keyword 'test'
+
${PROGNAME}: Failed to apply keyword 'test'
"
	atf_check \
		-e inline:"${output}" \
@@ -395,7 +395,7 @@ EOF

	atf_check \
		-o empty \
-
		-e inline:"${PROGNAME}: Requesting argument %2 while only 1 arguments are available\n${PROGNAME}: Fail to apply keyword 'testkeyword'\n" \
+
		-e inline:"${PROGNAME}: Requesting argument %2 while only 1 arguments are available\n${PROGNAME}: Failed to apply keyword 'testkeyword'\n" \
		-s exit:1 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .

@@ -410,7 +410,7 @@ EOF

	atf_check \
		-o empty \
-
		-e inline:"${PROGNAME}: Invalid argument: expecting a number got (%1)\n${PROGNAME}: Fail to apply keyword 'testkeyword'\n" \
+
		-e inline:"${PROGNAME}: Invalid argument: expecting a number got (%1)\n${PROGNAME}: Failed to apply keyword 'testkeyword'\n" \
		-s exit:1 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .

@@ -796,7 +796,7 @@ touch D

output="${PROGNAME}: Unable to access file ./A:No such file or directory
${PROGNAME}: Unable to access file ./B:No such file or directory
-
${PROGNAME}: Fail to apply keyword 'test'
+
${PROGNAME}: Failed to apply keyword 'test'
"

	atf_check \
modified tests/frontend/update.sh
@@ -18,7 +18,7 @@ EOF

	atf_check \
		-o match:"Unable to update repository test" \
-
		-e match:"Invalid url: 'file://empty//meta.conf'" \
+
		-e match:"Invalid URL: 'file://empty//meta.conf'" \
		-s exit:1 \
		pkg -R repos update
}
@@ -40,7 +40,7 @@ EOF

	atf_check \
		-o match:"Unable to update repository test" \
-
		-e match:"invalid url: 'file:/empty//meta.conf" \
+
		-e match:"Invalid URL: 'file:/empty//meta.conf" \
		-s exit:1 \
		pkg -R repos update

@@ -54,7 +54,7 @@ test: {
EOF
	atf_check \
		-o match:"Unable to update repository test" \
-
		-e match:"Invalid url: 'file://here/meta.conf'" \
+
		-e match:"Invalid URL: 'file://here/meta.conf'" \
		-s exit:1 \
		pkg -R repos update

@@ -114,7 +114,7 @@ EOF

	atf_check \
		-o match:"Unable to update repository test" \
-
		-e match:"Invalid url: 'file:/${here}/meta.conf'" \
+
		-e match:"Invalid URL: 'file:/${here}/meta.conf'" \
		-s exit:1 \
		pkg -R repos update