Debian Codegraph @

pam_fscrypt/run_test.go

raw
1 /*
2 * run_test.go - tests that the PAM helper functions work properly
3 *
4 * Copyright 2017 Google Inc.
5 * Author: Joe Richey ([email protected])
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
8 * use this file except in compliance with the License. You may obtain a copy of
9 * the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations under
17 * the License.
18 */
19
20 package main
21
22 import (
23 "testing"
24 )
25
26 func TestParseArgsEmpty(t *testing.T) {
27 // An empty argv should create a map with no entries
28 args := parseArgs(0, nil)
29 if args == nil {
30 t.Fatal("args map should not be nil")
31 }
32 if len(args) > 0 {
33 t.Fatal("args map should not have any entries")
34 }
35 }