fn minimal_config_file() {
        let config = ConfigFile::parse(
            "repository-dir = \"/repodir\"\n\
             tal-dir = \"taldir\"",
            &Path::new("/test/routinator.conf")
        ).unwrap();
        let config = Config::from_config_file(config).unwrap();
        assert_eq!(config.cache_dir.to_str().unwrap(), "/repodir");
        assert_eq!(config.tal_dir.to_str().unwrap(), "/test/taldir");
        assert!(config.exceptions.is_empty());
        assert_eq!(config.strict, false);
        assert_eq!(config.rsync_count, DEFAULT_RSYNC_COUNT);
        assert_eq!(config.validation_threads, ::num_cpus::get());
        assert_eq!(config.refresh, Duration::from_secs(DEFAULT_REFRESH));
        assert_eq!(config.retry, Duration::from_secs(DEFAULT_RETRY));
        assert_eq!(config.expire, Duration::from_secs(DEFAULT_EXPIRE));
        assert_eq!(config.history_size, DEFAULT_HISTORY_SIZE);
        assert_eq!(
            config.tcp_listen,
            Config::default_tcp_listen()
        );
        assert!(config.http_listen.is_empty());
        assert_eq!(config.log_level, LevelFilter::Warn);
        assert_eq!(
            config.log_target,
            LogTarget::default()
        );
    }
// ... because of drive letters in absolute paths on Windows.
because of drive letters in absolute paths on Windows.
because of drive letters in absolute paths on Windows .
fn minimal_config_file() {
        let config = ConfigFile::parse(
            "repository-dir = \"/repodir\"\n\
             tal-dir = \"taldir\"",
            &Path::new("/test/routinator.conf")
        ).unwrap();
        let config = Config::from_config_file(config).unwrap();
        assert_eq!(config.cache_dir.to_str().unwrap(), "/repodir");
        assert_eq!(config.tal_dir.to_str().unwrap(), "/test/taldir");
        assert!(config.exceptions.is_empty());
        assert_eq!(config.strict, false);
        assert_eq!(config.rsync_count, DEFAULT_RSYNC_COUNT);
        assert_eq!(config.validation_threads, ::num_cpus::get());
        assert_eq!(config.refresh, Duration::from_secs(DEFAULT_REFRESH));
        assert_eq!(config.retry, Duration::from_secs(DEFAULT_RETRY));
        assert_eq!(config.expire, Duration::from_secs(DEFAULT_EXPIRE));
        assert_eq!(config.history_size, DEFAULT_HISTORY_SIZE);
        assert_eq!(
            config.tcp_listen,
            Config::default_tcp_listen()
        );
        assert!(config.http_listen.is_empty());
        assert_eq!(config.log_level, LevelFilter::Warn);
        assert_eq!(
            config.log_target,
            LogTarget::default()
        );
    }
fn minimal_config_file ( ) { let config = ConfigFile :: parse ( " \" \" \n \
 \" \" " , & Path :: new ( " " ) ) . unwrap ( ) ; let config = Config :: from_config_file ( config ) . unwrap ( ) ; assert_eq ! ( config cache_dir to_str ( ) unwrap ( ) " " ) ; assert_eq ! ( config tal_dir to_str ( ) unwrap ( ) " " ) ; assert ! ( config exceptions is_empty ( ) ) ; assert_eq ! ( config strict false ) ; assert_eq ! ( config rsync_count DEFAULT_RSYNC_COUNT ) ; assert_eq ! ( config validation_threads num_cpus get ( ) ) ; assert_eq ! ( config refresh Duration from_secs ( DEFAULT_REFRESH ) ) ; assert_eq ! ( config retry Duration from_secs ( DEFAULT_RETRY ) ) ; assert_eq ! ( config expire Duration from_secs ( DEFAULT_EXPIRE ) ) ; assert_eq ! ( config history_size DEFAULT_HISTORY_SIZE ) ; assert_eq ! ( config tcp_listen Config default_tcp_listen ( ) ) ; assert ! ( config http_listen is_empty ( ) ) ; assert_eq ! ( config log_level LevelFilter Warn ) ; assert_eq ! ( config log_target LogTarget default ( ) ) ; }
... because of drive letters in absolute paths on Windows.
... because of drive letters in absolute paths on Windows .