--- var_test.c 2003/02/14 21:17:07 1.48
+++ var_test.c 2003/10/25 19:56:07 1.49
@@ -317,7 +317,7 @@
var_t *var;
char *err;
char *fmt;
- char *exp;
+ char *expect;
char *got;
ts_test_check(TS_CTX, "create environment");
@@ -334,15 +334,15 @@
/* check trivial formatting */
fmt = "foo";
- exp = "foo";
+ expect = "foo";
ts_test_check(TS_CTX, "formatting \"%s\"", fmt);
if ((rc = var_format(var, &got, 1, fmt)) != VAR_OK) {
var_strerror(var, rc, &err);
ts_test_fail(TS_CTX, "var_format: %s (%d)", err, rc);
return;
}
- if (strcmp(got, exp) != 0) {
- ts_test_fail(TS_CTX, "var_format: expected \"%s\", got \"%s\"\n", exp, got);
+ if (strcmp(got, expect) != 0) {
+ ts_test_fail(TS_CTX, "var_format: expected \"%s\", got \"%s\"\n", expect, got);
free(got);
return;
}
@@ -350,15 +350,15 @@
/* check real formatting */
fmt = "foo<%s><%d><%c>quux";
- exp = "foo<bar><123><x>quux";
+ expect = "foo<bar><123><x>quux";
ts_test_check(TS_CTX, "formatting \"%s\"", fmt);
if ((rc = var_format(var, &got, 1, fmt, "bar", 123, 'x')) != VAR_OK) {
var_strerror(var, rc, &err);
ts_test_fail(TS_CTX, "var_format: %s (%d)", err, rc);
return;
}
- if (strcmp(got, exp) != 0) {
- ts_test_fail(TS_CTX, "var_format: expected \"%s\", got \"%s\"\n", exp, got);
+ if (strcmp(got, expect) != 0) {
+ ts_test_fail(TS_CTX, "var_format: expected \"%s\", got \"%s\"\n", expect, got);
free(got);
return;
}
@@ -366,15 +366,15 @@
/* check combined formatting and expansion */
fmt = "foo<${ARRAY[%d]}>bar";
- exp = "foo<entry1>bar";
+ expect = "foo<entry1>bar";
ts_test_check(TS_CTX, "formatting \"%s\"", fmt);
if ((rc = var_format(var, &got, 1, fmt, 1)) != VAR_OK) {
var_strerror(var, rc, &err);
ts_test_fail(TS_CTX, "var_format: %s (%d)", err, rc);
return;
}
- if (strcmp(got, exp) != 0) {
- ts_test_fail(TS_CTX, "var_format: expected \"%s\", got \"%s\"\n", exp, got);
+ if (strcmp(got, expect) != 0) {
+ ts_test_fail(TS_CTX, "var_format: expected \"%s\", got \"%s\"\n", expect, got);
free(got);
return;
}
|