1#!/usr/bin/env python3 2 3# 4# CDDL HEADER START 5# 6# The contents of this file are subject to the terms of the 7# Common Development and Distribution License (the "License"). 8# You may not use this file except in compliance with the License. 9# 10# See LICENSE.txt included in this distribution for the specific 11# language governing permissions and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at LICENSE.txt. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. 24# 25 26from opengrok_tools.utils.indexer import merge_properties 27 28 29def test_merge_properties(): 30 merged = merge_properties(['foo', '-Dfoo=1'], 31 ['-Dfoo=2', '-Dbar=bar']) 32 assert sorted(merged) == ['-Dbar=bar', '-Dfoo=1', 'foo'] 33