📄 translate-test.c
字号:
cr_to_crlf(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert CR to CRLF"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("cr_to_crlf", "\r", "\r\n", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *mixed_to_crlf(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert mixed line endings to CRLF"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("mixed_to_crlf", NULL, "\r\n", 1, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *lf_to_lf(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert LF to LF"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("lf_to_lf", "\n", "\n", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *crlf_to_lf(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert CRLF to LF"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("crlf_to_lf", "\r\n", "\n", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *cr_to_lf(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert CR to LF"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("cr_to_lf", "\r", "\n", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *mixed_to_lf(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert mixed line endings to LF"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("cr_to_lf", NULL, "\n", 1, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *crlf_to_cr(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert CRLF to CR"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("crlf_to_cr", "\r\n", "\r", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *lf_to_cr(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert LF to CR"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("lf_to_cr", "\n", "\r", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *cr_to_cr(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert CR to CR"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("cr_to_cr", "\r", "\r", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *mixed_to_cr(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "convert mixed line endings to CR"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("mixed_to_cr", NULL, "\r", 1, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *mixed_no_repair(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "keep mixed line endings without repair flag"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("mixed_no_repair", NULL, "\n", 0, NULL, NULL, NULL, NULL, 1, pool)); SVN_ERR(substitute_and_verify ("mixed_no_repair", NULL, "\r\n", 0, NULL, NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}/** Keyword expansion alone. **/static svn_error_t *expand_author(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand author"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("author", "\n", NULL, 0, NULL, NULL, "jrandom", NULL, 1, pool)); SVN_ERR(substitute_and_verify ("author", "\r\n", NULL, 0, NULL, NULL, "jrandom", NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *expand_date(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand date"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("date", "\n", NULL, 0, NULL, "Wed Jan 9 07:49:05 2002", NULL, NULL, 1, pool)); SVN_ERR(substitute_and_verify ("date", "\r\n", NULL, 0, NULL, "Wed Jan 9 07:49:05 2002", NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *expand_author_date(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand author and date"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("author_date", "\n", NULL, 0, NULL, "Wed Jan 9 07:49:05 2002", "jrandom", NULL, 1, pool)); SVN_ERR(substitute_and_verify ("author_date", "\r\n", NULL, 0, NULL, "Wed Jan 9 07:49:05 2002", "jrandom", NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *expand_author_rev(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand author and rev"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("author_rev", "\n", NULL, 0, "1729", NULL, "jrandom", NULL, 1, pool)); SVN_ERR(substitute_and_verify ("author_rev", "\r\n", NULL, 0, "1729", NULL, "jrandom", NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *expand_rev(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand rev"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("rev", "\n", NULL, 0, "1729", NULL, NULL, NULL, 1, pool)); SVN_ERR(substitute_and_verify ("rev", "\r\n", NULL, 0, "1729", NULL, NULL, NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *expand_rev_url(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand rev and url"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("rev_url", "\n", NULL, 0, "1729", NULL, NULL, "http://subversion.tigris.org", 1, pool)); SVN_ERR(substitute_and_verify ("rev_url", "\r\n", NULL, 0, "1729", NULL, NULL, "http://subversion.tigris.org", 1, pool)); return SVN_NO_ERROR;}static svn_error_t *expand_author_date_rev_url(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "expand author, date, rev, and url"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("author_date_rev_url", "\n", NULL, 0, "1729", "Wed Jan 9 07:49:05 2002", "jrandom", "http://subversion.tigris.org", 1, pool)); SVN_ERR(substitute_and_verify ("author_date_rev_url", "\r\n", NULL, 0, "1729", "Wed Jan 9 07:49:05 2002", "jrandom", "http://subversion.tigris.org", 1, pool)); return SVN_NO_ERROR;}/** Keyword expansion and EOL conversion together. **/static svn_error_t *lf_to_crlf_expand_author(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "lf_to_crlf; expand author"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("lf_to_crlf_author", "\n", "\r\n", 0, NULL, NULL, "jrandom", NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *mixed_to_lf_expand_author_date(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "mixed_to_lf; expand author and date"; if (msg_only) return SVN_NO_ERROR; SVN_ERR(substitute_and_verify ("mixed_to_lf_author_date", NULL, "\n", 1, NULL, "Wed Jan 9 07:49:05 2002", "jrandom", NULL, 1, pool)); return SVN_NO_ERROR;}static svn_error_t *crlf_to_cr_expand_author_rev(const char **msg, svn_boolean_t msg_only, svn_test_opts_t *opts, apr_pool_t *pool){ *msg = "crlf_to_cr; expand author and rev"; if (msg_only)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -