Fossil

Check-in [e5830687]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the --symlink option to test-file-environment.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e583068713164db0ffcdb8436004125eae3cb38b0f26a9fc64bd41cdb8640444
User & Date: drh 2017-03-21 13:21:25
Context
2017-03-21
23:45
Added some UTF-16 cases, and a BOM case for UTF-8 to commit-warning.test check-in: 8705a525 user: rberteig tags: trunk
13:21
Add the --symlink option to test-file-environment. check-in: e5830687 user: drh tags: trunk
10:52
Improve commit-warning tests by constructing test files for interesting cases aiming for coverage of all the situations that should produce warnings independent of the other files in the fossil repository. check-in: 02bfb9b6 user: rberteig tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/file.c.

1028
1029
1030
1031
1032
1033
1034

1035
1036
1037
1038
1039

1040
1041
1042




1043
1044
1045
1046
1047
1048
1049
** display file system information about the files specified, if any.
**
** Options:
**
**     --open-config        Open the configuration database first.
**     --slash              Trailing slashes, if any, are retained.
**     --reset              Reset cached stat() info for each file.

*/
void cmd_test_file_environment(void){
  int i;
  int slashFlag = find_option("slash",0,0)!=0;
  int resetFlag = find_option("reset",0,0)!=0;

  if( find_option("open-config", 0, 0)!=0 ){
    Th_OpenConfig(1);
  }




  fossil_print("Th_IsLocalOpen() = %d\n", Th_IsLocalOpen());
  fossil_print("Th_IsRepositoryOpen() = %d\n", Th_IsRepositoryOpen());
  fossil_print("Th_IsConfigOpen() = %d\n", Th_IsConfigOpen());
  fossil_print("filenames_are_case_sensitive() = %d\n",
               filenames_are_case_sensitive());
  fossil_print("db_allow_symlinks_by_default() = %d\n",
               db_allow_symlinks_by_default());







>





>



>
>
>
>







1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
** display file system information about the files specified, if any.
**
** Options:
**
**     --open-config        Open the configuration database first.
**     --slash              Trailing slashes, if any, are retained.
**     --reset              Reset cached stat() info for each file.
**     --symlinks BOOLEAN   Force allow-symlinks on or off
*/
void cmd_test_file_environment(void){
  int i;
  int slashFlag = find_option("slash",0,0)!=0;
  int resetFlag = find_option("reset",0,0)!=0;
  const char *forceSymlinks = find_option("symlinks",0,1);
  if( find_option("open-config", 0, 0)!=0 ){
    Th_OpenConfig(1);
  }
  if( forceSymlinks ){
    if( is_truth(forceSymlinks) ) g.allowSymlinks = 1;
    if( is_false(forceSymlinks) ) g.allowSymlinks = 0;
  }
  fossil_print("Th_IsLocalOpen() = %d\n", Th_IsLocalOpen());
  fossil_print("Th_IsRepositoryOpen() = %d\n", Th_IsRepositoryOpen());
  fossil_print("Th_IsConfigOpen() = %d\n", Th_IsConfigOpen());
  fossil_print("filenames_are_case_sensitive() = %d\n",
               filenames_are_case_sensitive());
  fossil_print("db_allow_symlinks_by_default() = %d\n",
               db_allow_symlinks_by_default());